中国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 13:40
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,270 / 27
Floor16 terse Posted 2007-03-29 05:44
银牌会员 Posts 946 Credits 2,404
xcopy d:\th e:\th /s /i
Floor17 wangmeng052 Posted 2007-03-29 05:45
中级用户 Posts 154 Credits 334
The correct answer is: xcopy d:\th e:\th /s/e and then press Enter
Floor18 wangmeng052 Posted 2007-03-29 05:48
中级用户 Posts 154 Credits 334
Thanks to the brothers on floors 15 and 16. What's the difference between adding "i" and adding "e"?

[ Last edited by wangmeng052 on 2007-3-28 at 04:49 PM ]
Floor19 terse Posted 2007-03-29 05:53
银牌会员 Posts 946 Credits 2,404
Not adding "i" is to prompt for confirmation whether E:\TH is a directory or a file
Floor20 wangmeng052 Posted 2007-03-29 07:02
中级用户 Posts 154 Credits 334
Thank you very much. One more question, does the xcopy command exist in DOS entered from a 98 boot disk?
Floor21 b102588 Posted 2007-05-17 23:11
初级用户 Posts 34 Credits 83
Originally posted by terse at 2007-3-28 02:40 AM:
xcopy /e /q /i /h /r /y c:\source folder d:\target folder
It works on my machine. XP2


What is the difference between adding Y and not adding Y? Thanks
Floor22 VAF Posted 2007-05-18 03:35
中级用户 Posts 134 Credits 242
Originally posted by terse at 2007-3-29 05:53 AM:
Not adding "i" is to prompt for confirmation whether E:\TH is a directory or a file


There is this command, but it does not support long file names, and many parameters that are valid under XP are invalid here.
Floor23 vision Posted 2007-06-02 00:20
初级用户 Posts 27 Credits 64
None
Floor24 xiagege Posted 2009-02-18 23:49
新手上路 Posts 6 Credits 12
The path must be complete. If it's incomplete, the copied and arranged ones will be chaotic.
Floor25 wglwx Posted 2009-04-19 07:12
高级用户 Posts 187 Credits 616
xcopy /e /q /i /h /r /y c:\Source Folder d:\Target Folder
It can also work on my machine
Floor26 xiaoqiangzx Posted 2009-04-20 02:07
初级用户 Posts 12 Credits 34
The correct answer is: xcopy d:\th\*.* e:\th /s/e and then press Enter. If it still doesn't work, you can add a wildcard, which should work.
Floor27 wangfangjian Posted 2009-08-05 05:43
中级用户 Posts 192 Credits 274
Floor28 jh1688 Posted 2009-11-09 19:32
中级用户 Posts 126 Credits 248
Copy files and directory trees.

XCOPY source ] ]


...]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set,
but doesn't change the attribute.
/M Copies only files with the archive attribute set,
and clears the archive attribute.
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose source
time is newer than the destination time.
/EXCLUDE:file1...
Specifies a list of files containing strings. Each string
must be in a separate line in the file. If any string matches the
absolute path of the file to be copied, that file will not be copied.
For example, specifying a string like \obj\ or .obj will exclude
all files under directory obj or files with the .obj extension.
/P Prompts before creating each destination file.
/S Copies directories and subdirectories, excluding empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. Can be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination doesn't exist and copying more than one file,
assumes destination is a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files to be copied.
/G Allows copying unencrypted files to destinations that do not support encryption.
/H Also copies hidden and system files.
/R Overwrites read-only files.
/T Creates directory structure but does not copy files.
Does not include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy resets read-only attributes.
/N Copies using generated short names.
/O Copies file ownership and ACL information.
/X Copies file auditing settings (implies /O).
/Y Copies file auditing settings (implies /O).
Existing destination files.
/-Y Causes prompting to confirm overwriting an
existing destination file.
/Z Copies network files in restartable mode.

The command-line switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.

This is the XCOPY parameter under CMD. Some parameters like /I are not available in pure DOS, but /E is definitely there. The owner can refer to it and play around...
Prev  1 2
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023