中国DOS联盟论坛

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-15 14:29
47,813 topics / 349,903 posts / today 1 new / 48,257 members
DOS疑难解答 & 问题讨论 (解答室) » [Help] Why can't I copy directories together when using XCOPY?
Printable Version  4,271 / 27
Floor1 wangmeng052 Posted 2007-03-27 10:39
中级用户 Posts 154 Credits 334
Why can't XCOPY copy directories together?
Floor2 ywcn Posted 2007-03-27 10:51
初级用户 Posts 68 Credits 155
Adding the /s parameter allows copying subdirectories together
Floor3 BWSkyer Posted 2007-03-27 17:54
中级用户 Posts 180 Credits 367 From 重庆
But the root directory is still not okay. Every time I copy, I first create a directory on another disk and then copy, only then can it work! I don't know if I didn't read the parameters clearly!
Floor4 wangmeng052 Posted 2007-03-28 01:36
中级用户 Posts 154 Credits 334
Adding parameters still doesn't work.
Floor5 Michael Posted 2007-03-28 01:51
钻石会员 Posts 3,041 Credits 10,056
There is no situation that I haven't seen, and I really want to experience it.
Floor6 terse Posted 2007-03-28 02:40
银牌会员 Posts 946 Credits 2,404
xcopy /e /q /i /h /r /y c:\source folder d:\target folder
It works on my machine, XP2
Floor7 oilio Posted 2007-03-28 03:05
高级用户 Posts 303 Credits 641
The target doesn't need to exist in advance, relying on the /i parameter.
Floor8 wangmeng052 Posted 2007-03-28 07:18
中级用户 Posts 154 Credits 334
I tried it, but it still doesn't work.郁闷. . . . .
Floor9 ywcn Posted 2007-03-28 11:16
初级用户 Posts 68 Credits 155
Can't be? /i Should be no problem ah

xcopy "source directory name" "destination directory name" /i
If you want to copy subdirectories together, add /s at the end
Floor10 BWSkyer Posted 2007-03-28 11:40
中级用户 Posts 180 Credits 367 From 重庆
/I If the target does not exist and more than one file is being copied,
then it is assumed that the target must be a directory.

This system explains it like this: xcopy "source directory name" "destination directory name" /i

So, is the destination directory name created by oneself or the same as when I copy? What if it doesn't exist?
Floor11 terse Posted 2007-03-28 12:48
银牌会员 Posts 946 Credits 2,404
The goal can be the same as copy even if it doesn't exist in advance
Floor12 wzsunlight Posted 2007-03-28 17:59
初级用户 Posts 52 Credits 107
Originally posted by terse at 2007-3-27 01:40 PM:
xcopy /e /q /i /h /r /y c:\source folder d:\target folder
It works on my machine, XP2

Agree
Floor13 ywcn Posted 2007-03-29 03:44
初级用户 Posts 68 Credits 155
Originally posted by BWSkyer at 2007-3-27 10:40 PM:
/I If the target does not exist and more than one file is being copied,
it is assumed that the target must be a directory.

This system explains it like this: xcopy "source directory name" & ...


No need to create it in advance, this command will create it automatically
Floor14 wangmeng052 Posted 2007-03-29 04:56
中级用户 Posts 154 Credits 334
I made this under the command line of XP. xcopy d:\th e:\ /s and press Enter. Copy the th folder and its files on drive D to drive E. Only files are copied but folders are not.
Floor15 Climbing Posted 2007-03-29 05:44
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
xcopy d:\th e:\th /s /i
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023