Show Menu

Quick and Dirty Robocopy Cheat Sheet Cheat Sheet by

Robocopy Essential Params
robocopy

Syntax

Robocopy [SourceDir] [DestDir] [/Options]
Sour­ceDir Source directory
DestDir Desti­nation Directory
Options One or more of the list below

Recursion

/E
Copies all subdir­ect­ories (including empty ones).
/S
Copies subdir­ect­ories (excluding empty ones).

Exclusions

/XF file [file]
Excludes files with the specified names, paths, or wildcard charac­ters.
/XD dir [dir]
Excludes direct­ories with the specified names, paths, or wildcard charac­ters.

Indicators & Log

/LOG­:­file
Redirects output to the specified file, overwr­iting the file if it already exists.
/LOG­+:­file
Redirects output to the specified file, appending it to the file if it already exists.
/NP
Turns off copy progress indicator (% copied).
/TEE
Displays output in the console window, in addition to directing it to the log file specified by /LOG or /LOG+.

Retry Parameters

/R:n
Specifies the number of retries on failed copies. (The default is 1 million.)
/W:n
Specifies the wait time between retries. (The default is 30 seconds.)

Mirror Parameters

/PURGE
Deletes destin­ation files and direct­ories that no longer exist in the source.
/MIR
Mirrors a directory tree (equiv­alent to running both /E and /PURGE).
/CRE­ATE
Creates a directory tree structure containing zero-l­ength files only (that is, no file data is copied).
/SEC
Copies NTFS security inform­ation. (Source and destin­ation volumes must both be NTFS). Equivalent to /COPY­:DATS.
/NOC­OPY
Copies Nothing. Can be useful with /PURGE.

Move instead of Copy

/MOV
Moves files (that is, deletes source files after copying).
/MOVE
Moves files and direct­ories (that is, deletes source files and direct­ories after copying).

Additional Info

This is only part of the available commands, but enough to get out of many unpleasant situat­ions.
For a full list of commands, refer to Roboco­py.doc

Download the Quick and Dirty Robocopy Cheat Sheet Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/apressato_quick-and-dirty-robocopy-cheat-sheet.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Robocopy Cheat Sheet