Show Menu
Cheatography

Robocopy Top Parameters

Syntax

Robocopy [Sourc­eDir] [Desti­nat­ionDir] [/Options]

Simple Copy

Robocopy "­­D:­­\F­ol­­der­­My­S­t­uf­­f" "­­I:­­\S­imp­leC­opy­" /E
/E Copy subdir­ect­ories, including Empty ones.

Mirror Copy (Backup)

Backup a folder with exact contents (Mirror)

Show Copy Progress, No Log File:
Robocopy "­D:­\Fol­der­MyS­tuf­f" "­I:­\Mir­ror­Bac­kup­" /MIR /W:3 /R:1 /ETA /XJ /XF Thumbs.db

Log:
Robocopy "­D:­\Fol­der­MyS­tuf­f" "­I:­\Mir­ror­Bac­kup­" /MIR /W:3 /R:1 /LOG:"i­:/l­og.t­xt­" /NP /TEE /XJ /XF Thumbs.db

Full Log, Show and Log Skipped Files:
Robocopy "­D:­\Fol­der­MyS­tuf­f" "­I:­\Mir­ror­Bac­kup­" /MIR /W:3 /R:1 /LOG:"i­:/l­og.t­xt­" /NP /V /TEE /XJ /XF Thumbs.db

/MIR Mirror mode.
/R:1 Try to copy 1 more time a file if the copy fails.
/W:3 Wait 3 seconds before re-try to copy the fail file.
/LOG:"i­:/l­og.t­xt­" Save the log to a file.
/V Produce Verbose output, showing skipped files.
/TEE Output to console window, as well as the log file.
/NP No Progress - don't display percentage copied.
/ETA Show Estimated Time of Arrival of copied files. (Don't use this with /log)
/XJ Exclude Symlinks / NTFS Junction Point
/XF Thumbs.db Exclude files, in this case will exclude "­Thu­mbs.db­"

Preview Changes

Show changes Only (use /v to show skipped files) (Delete parameter "­/ND­L" to show all direct­ories names)
Robocopy "­­D:­­\F­ol­­der­­My­S­t­uf­­f" "­­I:­­\M­ir­­ror­­Ba­c­k­up­­" /MIR /L /NDL /LOG:"i­:/p­rev­iew.tx­t" /TEE /NP /XJ /XF Thumbs.db
/L List only - don't copy, timestamp or delete any files.

Server Backup

Robocopy "­­D:­­\F­ol­­der­­My­S­t­uf­­f" "­\\D­est­ina­tio­nSe­rve­r\S­har­e­" /MIR /FFT /R:3 /W:10 /Z /ETA /XJ
/FFT is a very important option, as it allows a 2-second difference when comparing timestamps of files, such that minor clock differ­ences between your computer and your backup device don't matter. This will ensure that only modified files are copied over, even if file modifi­cation times are not exactly synchr­onized.
/Z Copies files in Restart mode so it won't start again if interr­upted.

Useful Links

           
 

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 By Example Cheat Sheet

          More Cheat Sheets by RomelSan

          Nmap Basics Cheat Sheet
          OpenSSL Cheat Sheet