[DOS] XCOPY parameter description

Summary: [DOS]XCOPY parameter description

Z:>xcopy /? Copy files and tree-like directories. 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]rr [/EXCLUDE:file1[+file2][+file3]…]

source specifies the file to be copied.

destination specifies the location or/and the name of the new file.

/A Only copy the file set to save the attribute, do not change the attribute setting.

/M Only copy files set to save attributes and clear save attributes.

/D:m-d-y Copy files that have changed on or after the specified date. If no date is given, only those files whose source file date is newer than the destination file date are copied.

/EXCLUDE:file1[+file2][+file3]… Specify the file list string. Each string should be on a different line in the file. If there is a string corresponding to any part of the absolute path of the file to be copied, the file will be excluded from copying. For example, if you specify the character string obj or .obj, it will exclude all files whose subfile name is .obj in the obj directory from being copied.

/P displays a prompt when creating each destination file.

/S copies each directory and its subdirectories, not empty directories.

/E copies each directory and its subdirectories, and also copies empty directories. /S is the same as /E and can be used to modify /T.

/V verifies each new file. /W Prompts you to press to continue before copying.

/C Continue copying if an error occurs.

/I If the destination does not exist and more than one file is copied, it is assumed that the specified destination must be a directory.

/Q Do not display the file name when copying.

/F displays all the file names of the source and destination files when copying.

/L displays the file to be copied.

/G allows encrypted files to be copied to destinations that do not support encryption.

/H copy hidden files and system files.

/R Overwrite read-only files.

/T establishes the directory structure, but does not copy the files in it. Excludes empty directories and subdirectories. /T /E will include empty directories and subdirectories.

/U Only copy files that already exist in the destination location.

/K Copy file attributes. Usually Xcopy will reset the read-only attribute.

/N Use the generated short file name to copy.

/O Copy file ownership and ACL information.

/X Copy file review settings (including /O).

/Y Do not prompt you to confirm whether to overwrite an existing file.

/-Y indicates whether you want to overwrite an existing file.

/Z Copy network files in restartable mode.

The parameter /Y can be preset in the COPYCMD environment variable. But you can use the /-Y parameter in the command line to overwrite the original setting.

XCOPY xcopy source folder destination folder for backup /S /D /Y

Original text: large column [DOS] XCOPY parameter description

Leave a Comment

Your email address will not be published.