Quantcast
Channel: Microsoft Community - Using ROBOCOPY In A Batch Script To Backup Files & Folders On Windows Vista/7
Viewing all articles
Browse latest Browse all 78

Using ROBOCOPY In A Batch Script To Backup Files & Folders On Windows Vista/7

$
0
0

I apologize for not replying sooner.  I never received a notice from the Answers server that I had any posts on this thread.  I'm glad you like the script.  I've been using it for a long time now with great success.

 

The two robocopy commands are actually different.  Taken from the ROBOCOPY whitepaper published by Microsoft, the /CREATE switch tells robocopy to only copy the files and folders, but only creates the heirarchy and files with zero bytes of data.  This, apparently, helps reduce fragmentation of your backup volume file system.  Once that process is complete, the command is invoked again, this time without the /CREATE switch, and all of the data is then copied to the backup volume.

 

The two forfiles commands might be a mistake.  It's been so long I cannot remember.  I have a feeling that I had been testing the two commands, and instead of deleting one of them, I just uncommented it instead.  So, feel free to do some testing on those, and choose the one that works for you.  Something tells me I might of done that to sweep up some stubborn files that didn't seem to get deleted with the first command, or I might have found it necessary to use both in order for the script to operate on XP/Vista/7 equally well.  Just can't remember for sure.

 

Thank you!


Viewing all articles
Browse latest Browse all 78

Trending Articles