Bergesch Computer Services, Inc.
Ad free site!
See About Us.

Xcopy - DOS isn't dead yet

XCOPY source destination [/switch(es)]

source Specifies the file(s) to copy and destination specifies the location and/or name of new files.

Examples: xcopy "C:\Documents and Settings\Username\My Documents\*.doc"  D:\

Copies all files with the DOC extension to the D: drive

xcopy "C:\Documents and Settings\Username\My Documents\*.*"  D:\ /E /Y

Copies all folders AND files found under the My Documents folder to the D: drive replacing any that already exist.

Because of long filenames and/or spacing in filenames, you must wrap the individual parts of the command within quotes as shown above.  Failure to do so would result in Xcopy reading only C:\Documents as the source in our example. 

Xcopy also recognizes URL addresses so rather than having (obsolete) mapped network drives, you can simply use the URL. 

Example: xcopy "\\Server\Databases\PSTFiles\*.pst" C:\temp\*.* /y

Note:  Xcopy is not case sensitive. 

Command Line Switches (important ones for backing up in bold):