Some Robocopy help

Soldato
Joined
3 Apr 2007
Posts
3,438
Location
Manchester
Hi, I'm just writing a batch file using robocopy.exe to backup my data to a spare HDD.

What I want it to do is an exact mirror of what I have on drive D, onto drive E. So if delete some data off D, I want that replicated on E. (if that makes sense)

I was thinking of something like this:

Code:
robocopy.exe "D:\Share" "E:\Share" /PURGE
pause
exit

Can anyone offer any advice?

Cheers :)
 
use both switches /mir /purge also a log file might be nice too, just in case you want to nkow what happened last copy... And do you want to copy user permission owner and data correctly? If so add those switches too :)
 
Just testing the below, seems to do what I want, will take a while to complete though.
Code:
robocopy.exe "D:\Share" "E:\Share" /mir /log:"E:\backup.log" /tee
pause
exit
Leperous - Why use both /mir and /purge? whats the advantage?

Cheers :)
 
Sorry i'm being slightly dense there, i mean you could use mirror, or purge and the copyall:xxx switch, gives you a little more control over the attributes you copy :) Also remember the special vista date switch if you want to make sure the modified date stays the same as the soruce file :)
 
Thanks guys, have settled on the below and it seems to be working perfectly :)

Code:
robocopy.exe "D:\Share" "E:\Share" /mir /log:"E:\backup.log" /np /tee
pause
exit
 
Back
Top Bottom