Name

xcopy — \windows\system32\xcopy.exe

Synopsis

xcopy works like copy, but provides more options, works with multiple directories, and is often faster. The xcopy32 options are:

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] 
   [/exclude:filenames]

Option

Description

source

Specifies the file(s) to copy; source must include the full path.

destination

Specifies the location and/or names of new files. If omitted, files are copied to the current directory.

/a

Copies files with the archive attribute set, but doesn't change the attribute of the source file (similar to /m).

/c

Continues copying even if errors occur.

/d: date

Copies only files changed on or after the specified date. If no date is given, copies only those source files that are newer than existing destination files.

/e

Copies all directories and subdirectories (everything), including empty ones (similar to /s). May be used to modify /t.

/exclude: filenames

Specifies a file (or a list of files) containing strings of text (each on its own line). When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. Contrary to what you might expect, filenames does not actually list the filenames to exclude.

/f

Displays full paths while copying (unless /q is specified); normally, only filenames are displayed.

/h

Get Windows XP Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.