edutech4schools Posted May 7, 2012 Posted May 7, 2012 Hi, I am total useless at robocopy syntax. I always end up with multiply commands that all seem to do the same thing. I do have the list of switches but would like some help. What I simply need is to copy the contents from one folder to another without it wiping the destination first and just to copy any new or updated files and log any problems. should I use the /mir or something else? Thanks
Steve21 Posted May 7, 2012 Posted May 7, 2012 (edited) Hi, I am total useless at robocopy syntax. I always end up with multiply commands that all seem to do the same thing. I do have the list of switches but would like some help. What I simply need is to copy the contents from one folder to another without it wiping the destination first and just to copy any new or updated files and log any problems. should I use the /mir or something else? Thanks Mir will delete it all if it's not there anymore. So generally better not to use it (imo). This is one of my personal ones I use on my nas: robocopy C:\ "\\MYNAS\StevePC\%date:/=-% C Backup" /M /S /R:2 /W:2 /XJ /B /XF *thumbs.db* *ntuser.dat* "C:\pagefile.sys" "C:\hiberfil.sys" /XD "$RECYCLE.BIN" Obviously can remove the bits you don't want, but: /M removes archive bits, aka makes it incremental so only copies things that change /S copy subfolders too /R:2 retries on fails /W:2 wait seconds between retries /XJ ignores junction points (aka if you had a shortcut to another drive, it won't go off and copy that drive too /B use backup mode for files that normally you can't access /XD/XF exclude files/folders you don't want copied -Edit noticed you said logging too: /LOG:filename <- makes log /TEE shows log in command prompt and output (but don't need that really) /NDL ignores directorys in terms of logging, else it'll spam you all then time Edit 2 - My whole one: robocopy C:\ "\\MYNAS\StevePC\%date:/=-% C Backup" /LOG:"\\MYNAS\StevePC\%date:/=-% C Backup\Log.txt" /TEE /NDL /M /S /R:0 /W:2 /XJ /B /XF *thumbs.db* *ntuser.dat* "C:\pagefile.sys" "C:\hiberfil.sys" /XD "$RECYCLE.BIN" "System Volume Information" "ProgramData" "C:\Windows" "C:\Program Files" "C:\Program Files (x86)" *Temporary* "C:\Boot" "C:\Users\Steve\Appdata" Steve Edited May 7, 2012 by Steve21
SpuffMonkey Posted May 7, 2012 Posted May 7, 2012 Download Richcopy instead - same thing but with an easy to use GUI
Arthur Posted May 7, 2012 Posted May 7, 2012 The main problem with RichCopy is that it hasn't been updated since 2009 and still has quite a few bugs (like the one where ACLs aren't copied across).
edutech4schools Posted May 7, 2012 Author Posted May 7, 2012 ACLs would be handy for work but RichCopy might be what I need for home.
edutech4schools Posted May 7, 2012 Author Posted May 7, 2012 Mir will delete it all if it's not there anymore. So generally better not to use it (imo) Is that not what you would want? If I delete a folder on the source it will delete it on the destination. or have I missed your point?
Steve21 Posted May 7, 2012 Posted May 7, 2012 Is that not what you would want? If I delete a folder on the source it will delete it on the destination. or have I missed your point? It depends if you want to backup items or just copy e.g. If a student deletes a file and you're using /Mir you just lost your backup So really depends on what you want to do with it? Steve
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now