Saturday, September 17, 2011

XCOPY command


Xcopy

Copies files and directories, including subdirectories.

Syntax

xcopy Source Destination /d /s /e /y

/d[:mm-dd-yyyy] : Copies source files changed on or after the specified date only. If you do not include a mm-dd-yyyy value, xcopy copies all Source files that are newer than existing Destination files. This command-line option allows you to update files that have changed.

/y : Suppresses prompting to confirm that you want to overwrite an existing destination file.

/s : Copies directories and subdirectories, unless they are empty. If you omit /s, xcopy works within a single directory.

/e : Copies all subdirectories, even if they are empty.


To obtain a list of the files to be copied by the previous command (that is, without actually copying the files): 
          xcopy Source Destination /d /s /e /y /l > xcopy.out

Above command tells only which files will be copied after executing this command  xcopy Source Destination /d /s /e /y.

Help Taken from http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx?mfr=true

No comments:

Post a Comment