中国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 12:24
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » The specific format of the XCOPY command for copying an entire directory under DOS: XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B] [/J] [/EXCLUDE:file1[+file2][+file3]...] Explanation: - `source`: The path of the source directory. - `destination`: The path of the destination directory. - `/A`: Copies only files with the archive attribute set, and does not clear the archive attribute. - `/M`: Copies only files with the archive attribute set, and clears the archive attribute. - `/D[:date]`: Copies files changed on or after the specified date. If no date is specified, copies only files that are newer than those in the destination directory. - `/P`: Prompts before creating each destination file. - `/S`: Copies directories and subdirectories (excluding empty ones). - `/E`: Copies directories and subdirectories (including empty ones). - `/V`: Verifies the integrity of the copied files. - `/W`: Prompts for a key before starting the copy. - `/C`: Continues copying even if errors occur. - `/I`: If the destination is a directory or a multiple-file copy, assumes the destination is a directory. - `/Q`: Does not display file names while copying. - `/F`: Displays the full source and destination file names while copying. - `/L`: Lists the files that would be copied, but does not actually copy them. - `/G`: Allows the use of simple encryption for copying to a compatible destination. - `/H`: 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. - `/U`: Copies only files that already exist in the destination directory. - `/K`: Preserves the read-only attribute of the copied files. - `/N`: Uses short file names when copying. - `/O`: Copies file ownership and ACL information. - `/X`: Copies file audit settings (implies /O). - `/Y`: Suppresses prompting to confirm overwriting an existing destination file. - `/ -Y`: Prompts to confirm overwriting an existing destination file. - `/Z`: Copies files in restartable mode. - `/B`: Copies the symbolic link itself instead of the target of the symbolic link. - `/J`: Copies using unbuffered I/O. This can increase performance for large files. - `/EXCLUDE:file1[+file2][+file3]...`: Specifies a list of files containing strings. Any file with a full path that matches any of the strings in the file will be excluded from copying.
Printable Version  2,278 / 0
Floor1 ko20010214 Posted 2003-06-01 00:00
版主 Posts 1,628 Credits 7,296
Sender: ccccccc (Broken Mouth ★ Unemployed), Forum: DOS
Subject: Re: Please tell me the specific format of the command to copy an entire directory under DOS, thanks
Posted: BBS Tsinghua Station (Wed Mar 21 23:41:56 2001)

XCOPY source
source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies files with the archive attribute set,
doesn't change the attribute.
/M Copies files with the archive attribute set,
turns off the archive attribute.
/D:date Copies files changed on or after the specified date.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies any subdirectories, even if empty.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.

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

【In reply to merlinx (Hasa Yaqi - Super Apple Jasmine Pie with Red Outside and Gray Inside)】
: xcopy ?


--
What kind of government there is, what kind of people there are; what kind of people there are, what kind of government there is

※ Source:·BBS Tsinghua Station smth.org·

(Copied using S-Term article copy script)
==================================================
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023