Previous Posts


Microsoft Ships 'Emergency' WMF Patch

Microsoft has its eye on IBM

Apple's plan for world domination (TM)

Programs that you cannot uninstall

Dell Inkjet printers are a scam.

Shortcuts keep stealing my browser

Windows Administration - Start of a new year

VNC Flaw Test



Archives

May 2005

January 2006

April 2006

May 2006

June 2006

July 2006

September 2006

October 2006

November 2006

December 2006

January 2007

February 2007

March 2007

April 2007

May 2007

June 2007

July 2007

August 2007

September 2007

October 2007

November 2007

December 2007

January 2008

February 2008

March 2008

April 2008

May 2008



Subscribe to our Feed:






Robocopy is an administrators best friend

I am not sure if you have heard of it. Robocopy. It is a free command line utility that has been included with the NT line of windows for some time now. I actually think all the way back to NT 4.0. It is usually in the resource kit. This tool has saved me tons of time over the years. It essentialy lets you do a file synchronization between windows PCs. Perfect for when you need to copy gigs of data over the wan, but need something that will keep retrying until the job is done.


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

 



Copyright © IntelliAdmin, LLC, 2008. All Rights Reserved