Copies folders and their contents, including files and subfolders.
xcopy source [destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/d[:date]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [/a|/m] [/n] [/o] [/x] [/exclude:file1[+[file2]][+[file3]] [/y | /-y] [/z]
Parameters | |
---|---|
| |
Parameter | Purpose |
| |
source | Specifies location and name of the files to be copied. |
[destination] | Specifies the destination of the copied files. |
[/w] | Displays a confirmation message and waits for a reply. |
[/p] | Prompts for confirmation before creating destination files. |
[/c] | Ignores all errors. |
[/v] | Verifies the success of each copy operation. |
[/q] | Prevents the display of xcopy messages. |
[/f] | Displays the file names being copied. |
[/l] | Prevents command execution and displays a list of files that would have been copied. |
/d[:date] | Copies source files that have been changed on or after date. |
[/u] | Copies files from source if they also exist on destination. |
[/I] | Creates the destination folder, if it does not exist, if source is a directory or contains wildcards. |
[/s] | Copies directories and subdirectories as long as they contain files. |
[/e] | Copies all subfolders. |
[/t] | Copies the subdirectory structure and not the files. |
[/k] | Copies read-only files to the destination where they will retain their read-only status. |
[/r] | Overwrites read-only files. |
[/h] | Copies files with hidden and system file attributes. |
[/a] | Copies source files that have archive file attributes set. |
[/m] | Copies source files that have archive file attributes set and then turns off archive file attributes. |
[/o] | Copies file ownership and discretionary access control list data. |
[/x] | Copies audit settings and system access control list data. |
[/n] | Copies files using their NTFS short names. |
[/exclude:file1[+ [file2]][+[file3]] | Excludes the files listed in specified files from being copied. |
[/y] | Suppresses confirmation prompts when overwriting existing destination files. |
[/−y] | Requires confirmation prompts before overwriting existing destination files. |
[/z] | Copies files to the network in restartable mode so that the copy operations will resume after failed connections are reestablished. |