Lets say you want to copy the contents of c:\data to a network folder e:\data, but only want to retry 5 times if the copy is failing on any individual file:
robocopy c:\data e:\data /r:5
The above will only copy the root folder, not any subdirectories. To include all subdirectories use the /s switch:
robocopy c:\data e:\data /s /r:5
Now one problem I always run into is that I will have a ton of little files that are failing for one reason or another. They are usually log files that are in use and I don't care about them. To get the wait time between failures short and sweet then use the /w option. It tells it the number of seconds to wait between failures:
robocopy c:\data e:\data /s /r:5 /w:1
Now you are scratching your head, and think to yourself: "How is this different from xcopy - other than these retry and wait functions?"
It only copies the folders and files it sees as *new*. If you copied 1.2 GB of folder c:\data, and it got cut out in the last few files - you can call up robocopy and it will only copy the files that are newer, or do not exist on the remote side.
At the end of a copy it will give you a report. It lets you know how many files and folders were copied, and how many errors.
One of these days when I am in a programming mood I might throw together a GUI for those that find the command line interface too hard to understand ;()
If you don't have the resource kit, you can download a copy of robocopy here (Note: It only works on 2000, XP, NT, 2003, and Vista systems - no 98/95/ME sorry!)
Posted By: Steve Wiseman on Friday, January 06, 2006
Check out our utilities for windows
