0% found this document useful (0 votes)
19 views1 page

Robo

This document provides a cheat sheet on using the Robocopy command line tool for copying files and folders in Windows. It outlines the basic syntax, examples for simple copies, mirror backups, previews of changes, and server backups. Options for the copies are also described.

Uploaded by

tsantes.di
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Robo

This document provides a cheat sheet on using the Robocopy command line tool for copying files and folders in Windows. It outlines the basic syntax, examples for simple copies, mirror backups, previews of changes, and server backups. Options for the copies are also described.

Uploaded by

tsantes.di
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Robocopy Cheat Sheet

by RomelSan (RomelSan) via cheatography.com/3953/cs/4995/

 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:​/lo​g.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

Robocopy Parame​ters: https:​//t​ech​net.mi​cro​sof​t.c​om/​en-​us/​lib​rar​y/c​c73​314​5.aspx


Robocopy Examples: http:/​/so​cia​l.t​ech​net.mi​cro​sof​t.c​om/​wik​i/c​ont​ent​s/a​rti​cle​s/1​073.ro​boc​opy​-an​d-a​-fe​w-e​xam​ple​s.aspx

By RomelSan (RomelSan) Published 24th August, 2015. Sponsored by Readability-Score.com


cheatography.com/romelsan/ Last updated 3rd October, 2016. Measure your website readability!
keybase.io/romel Page 1 of 1. https://readability-score.com

You might also like