Copies directories, their subdirectories, and files (except hidden and
With this command, you can copy all the files in a directory, including the
files in the subdirectories of that directory.
XCOPY source [destination] [/Y|/-Y] [/A|/M] [/D:date] [/P] [/S] [/E]
Specifies the location and names of the files you want to copy. Source
must include either a drive or a path.
Specifies the destination of the files you want to copy. Destination can
include a drive letter and colon, a directory name, a filename, or a
Indicates that you want XCOPY to replace existing file(s) without
prompting you for confirmation. By default, if you specify an existing
file as the destination file, XCOPY will ask you if you want to
overwrite the existing file. (Previous versions of MS-DOS would simply
replace the existing file.) If the XCOPY command is part of a batch
file, XCOPY will behave as in previous versions. Specifying this switch
overrides all defaults and the current setting of the COPYCMD
Indicates that you want XCOPY to prompt you for confirmation when
replacing an existing file. Specifying this switch overrides all
defaults and the current setting of the COPYCMD environment variable.
Copies only source files that have their archive file attributes set.
This switch does not modify the archive file attribute of the source
file. For information about how to set the archive file attribute, see
the ATTRIB command.
Copies source files that have their archive file attributes set. Unlike
the /A switch, the /M switch turns off archive file attributes in the
files specified in source. For information about how to set the archive
file attribute, see the <ATTRIB> command.
Copies only source files modified on or after the specified date. Note
that the format of date depends on the COUNTRY setting you are using.
Prompts you to confirm whether you want to create each destination
Copies directories and subdirectories, unless they are empty. If you
omit this switch, XCOPY works within a single directory.
Copies any subdirectories, even if they are empty.
Verifies each file as it is written to the destination file to make sure
that the destination files are identical to the source files.
Displays the following message and waits for your response before
starting to copy files:
Press any key to begin copying file(s)
For information about copying individual files, see the <COPY> command. For
information about copying disks, see the <DISKCOPY> command.