This article was previously published under Q289483
The xcopy and the xcopy32 commands have the same switches. This article describes the switches that available when you run the commands outside of Windows (in MS-DOS mode), and when you run the commands from an MS-DOS window.
The following command line includes the syntax and the switches that you can use with the xcopy and the xcopy32 commands in MS-DOS mode:
NOTE: The square brackets () indicate optional switches. The brackets are not part of the command.
The following table describes the optional switches you can use with xcopy and xcopy32:
Specifies the file to copy.
Specifies the location and the name of new files.
Copies files with the archive attribute set. This switch does not change the attribute.
Copies files with the archive attribute set, and turns off the archive attribute.
Copies files changed on or after the specified date.
Prompts you before creating each destination file.
Copies folders and subfolders except empty ones.
Copies any subfolder, even if it is empty.
Verifies each new file.
Prompts you to press a key before copying.
WARNING: Long file names are not retained in MS-DOS mode.
NOTE: In Windows Millennium Edition (Me) only, an /h switch is added to the xcopy and the xcopy32 commands. This switch copies hidden and system files in MS-DOS mode. However, the Xcopy files are not automatically included on the Windows Me boot disk.
The following command line includes the syntax and the switches for the xcopy and the xcopy32 commands when you run it from an MS-DOS window: