RoboCopy init

Soldato
Joined
28 Sep 2008
Posts
14,207
Location
Britain
Sup G's,

RoboCopy for the win, right? Across a WAN link, just looking for a simple one liner to copy a directory / file structure, but then I want it to only make delta changes (so no deletes on the destination, but filename changes, new files, changes to files).

I'm thinking I run a one off with the /MIR switch and then put another one in place as the actual scheduled run.

Any ideas?

Thanks
 
Code:
robocopy "c:\my documents" "\\remoteserver\my documents" /MIR /COPYALL R:5 W:5

That's what we normally do in work, but I notice the version on my PC has a lot more switches!

What I also do is a test copy, so create a dummy file structure, test copy and do what changes you want the run a few tests.

R:X and W:X are pretty important in case it detects a fault with the link during the copy, you need to tailor this so use your own values. The default I think is 1 million retries with a 30 second wait in between - not ideal.

MIR switch will earth spike anything in the destination that isn't in source, use with caution.
 
MIR will delete.

What you want is simply

robocopy /E "c:\source" "d:\destination"


--

-Good idea to add the R:5 and W:5, especially over a WAN link, if you don't add them, it will retry 1 million times before giving up, once every 30 seconds! (a frankly ridiculous default)


R:5 means retry 5 times
W:5 means wait 5 seconds between attempts

Code:
robocopy /E "c:\source" "d:\destination" /R:5 /W:5
 
This command won't detect changes in filename though will it? It will treat filename changes as new names, no bad thing I guess, but still.
 
Back
Top Bottom