O'Reilly logo

Windows XP in a Nutshell by Troy Mott, Tim O'Reilly, David A. Karp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

xcopy — \windows\system32\xcopy.exe

Synopsis

Copy files and directory trees (directories, subdirectories, and their contents).

Syntax

xcopy source [destination] [/a | /m] [/d[:date]] [/p] [/s [/e]] 
    [/v] [/w] [/c] [/i] [/q] [/f] [/l] [/g] [/h] [/r] [/t] [/u] 
    [/v] [/w] [/c] [/i] [/q] [/f] [/l] [/g] [/h] [/r] [/t] [/u] 
    [/k] [/n] [/o] [/x] [/y] [/-y] [/z] [/exclude:filenames]

Description

xcopy works like copy, but provides more options and is often faster.

The xcopy32 options are:

source

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

destination

Specifies the location and/or name 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 source and destination ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required