![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 17:24 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » Question about XCOPY!? |
| Printable Version 730 / 5 |
| Floor1 xiaojun | Posted 2003-06-28 00:00 |
| 银牌会员 Posts 499 Credits 2,202 | |
|
I want to copy folder 1 on drive C, including everything in it, to drive D. But when I use xcopy, it copies all the files under 1 straight onto D in a complete mess, scattered all over the place. Is this command wrong?:
xcopy c:\1 d: |
|
| Floor2 LanE | Posted 2003-06-28 00:00 |
| 银牌会员 Posts 648 Credits 1,835 | |
|
XCOPY copies the contents under a folder to another directory. For example, if you use xcopy c:\1 d:, it actually copies the files under the c:\1 folder to d:, and does not include the 1 directory level itself. Also, if you want to copy everything under c:\1 (including subdirectories and empty directories), then you need to add the /s and /e parameters.
|
|
| Floor3 ko20010214 | Posted 2003-06-28 00:00 |
| 版主 Posts 1,628 Credits 7,296 | |
|
xcopy c:\1 d:\1 /s/e
It will ask whether you are copying to a file or a directory. Choose “directory” (just press the D key). That way it won’t end up scattered all over the place! Parameter S means include subdirectories, and parameter E means include empty subdirectories. |
|
| Floor4 LanE | Posted 2003-06-28 00:00 |
| 银牌会员 Posts 648 Credits 1,835 | |
|
Which XCOPY is KO using?
Why doesn’t my XCOPY ask me whether I’m copying to a file or a directory? |
|
| Floor5 xiaojun | Posted 2003-06-28 00:00 |
| 银牌会员 Posts 499 Credits 2,202 | |
|
Ah, thanks! Thanks! That clears it up! . Many thanks to the brothers in the posts above!
|
|
| Floor6 ko20010214 | Posted 2003-06-28 00:00 |
| 版主 Posts 1,628 Credits 7,296 | |
The following is quoted from LanE at 2003-6-28 17:50:58: Man, I’m using the same xcopy as you. When you copy a directory to a directory on another drive, if the target directory you specify does not exist on the other drive, it will ask whether you are copying to a file or a directory. If the answer is directory (press the D key), then it will create that target directory on the other drive first. Then it will proceed with the copy. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |