Link to home
Start Free TrialLog in
Avatar of IDEASDesign
IDEASDesign

asked on

Robocopy - what do these command line options mean?

What do the command line options for these 2 different robocopy scripts signify?

robocopy d:\ \\servername\F$\WEB2\ /e /xo /R:0 /W:0 /LOG:C:\backuplog.txt /NP

robocopy d:\ \\servername\myfolder\WEB2\ /mir /R:0 /W:0 /LOG:C:\backuplog2.txt /NP

I found these lines in a couple of BAT files on our web server, and I'd like to know how they differ from eachother.  I know that the 2nd one is set up for data mirroring, .. though I'm uncertain about the 1st one.  

Please advise.

Thanks!
- Yvan




Avatar of SteveGTR
SteveGTR
Flag of United States of America image

You can type robocopy /??? for command line option help.
For instance (and I'm just looking at the help), the /e switch copies subdirectories even empty ones
robocopy
      d:\
      \\servername\F$\WEB2\
      /e
      /xo
      /R:0
      /W:0
      /LOG:C:\backuplog.txt
      /NP

robocopy
      d:\
      \\servername\myfolder\WEB2\
      /mir
      /R:0
      /W:0
      /LOG:C:\backuplog2.txt
      /NP

robocopy - the command
d:\ - the source
\\servername\f$\web2 and \\servername\myfolder\WEB2\ - the destination
/e - copy subdirectories, including Empty ones
/xo - eXclude Older files
/R:0 - number of Retries on failed copies: default 1 million
/W:0 - Wait time between retries: default is 30 seconds
/LOG: - output status to LOG file (overwrite existing log)
/NP - No Progress - don't display % copied.
/MIR - MIRror a directory tree (equivalent to /E plus /PURGE)
ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 65td
This link explains the switches, also robocopy /? from the command line lists the switches.
http://www.ss64.com/nt/robocopy.html

/E : Copy Subfolders, including Empty Subfolders
/XO : eXclude Older - if destination file exists and is the same date or newer than the source - don't bother to overwrite it.

/R:n : number of Retries on failed copies - default is 1 million.
              /W:n : Wait time between retries - default is 30 seconds.

/NP : No Progress - don't display % copied.

/MIR : MIRror a directory tree - equivalent to /PURGE plus all subfolders (/E)

/LOG:file : output status to LOG file (overwrite existing log).
       
Hope that's what you were looking for.




65td read replies first?
Avatar of IDEASDesign
IDEASDesign

ASKER

Thanks RQuadling!  Your most recent response is exactly the information I was looking for.

Cheers,
- Yvan
/e is update, /mir is replicate
Sorry RQuading, but when I took the question the relies were at ZERO!
Don't worry. That's normal here. Ask TeRReF. The number of times I put the same answer as him but mine gets there first.
Looks like it's my browser dosn't refresh or you guys are way to quick to anwser.

Cheers
You did take a whole 7 minutes to answer!

;-)