中国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-12 16:48
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Question about using the XCOPY command to copy a folder
Printable Version  994 / 3
Floor1 libeili Posted 2010-03-09 14:10
新手上路 Posts 5 Credits 7
I want to make XCOPY not only copy the subdirectories under that directory and the files in those subdirectories, but also copy the folder itself. For example, the file structure is as follows:
D:\
----------A (folder)
------A1 (subfolder)
.....(files under the A1 folder)

E:\
I want to copy the entire A folder to E, so that the final folder structure is
E:\
----------A (folder)
------A1 (subfolder)
.....(files under the A1 folder)
Using the command XCOPY D:\A E:\ /e /s /d only gives the following result
E:\
------A1 (subfolder)
.....(files under the A1 folder)

How can I achieve the function described above?
Floor2 tachyon Posted 2010-03-09 14:18
初级用户 Posts 32 Credits 33
Floor3 libeili Posted 2010-03-09 15:19
新手上路 Posts 5 Credits 7
Many thanks to post #2
Floor4 tachyon Posted 2010-03-09 15:25
初级用户 Posts 32 Credits 33
You're welcome.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023