Although “Robocopy” sounds like something robots do to make baby robots, it actually stands for “Robust File Copy” and is a popular (and free) tool from Microsoft. It’s included with Windows Vista and is available for Windows XP and Windows 200 as part of the Windows 2003 Server Resource Kit (despite the “Windows 2003? name, Robocopy works just fine in Windows 2000, XP and Vista).
What’s so cool about it is that it’s a command-line program for copying files from one place to another, yet it has some powerful features that you can’t get simply by dragging and dropping files using Windows Explorer. For instance, you can have Robocopy copy all the NTFS security information from certain files. You can set the number of retries on failed copies, exclude or include changed, newer or older files, copy subdirectories but not empty ones, copy subdirectories including empty ones and much, much more.
One of my favorite Robocopy options is /mir, which creates an exact copy of any directory on another drive or network share. This is an *excellent* tool for making backups. Here’s a sample of a batch file I use to copy my application and music files over to my server:
robocopy.exe \\mycomputer\applications \\server\applications /mir /eta /tee
robocopy.exe \\mycomputer\jukebox \\server\jukebox /mir /xd Recycled Recycler “System Volume Information” Temp /eta /tee
Both commands use the /mir switch to mirror the source directories and also use the /eta switch to show the estimated completion time and /tee to send output to console window. Since the “Jukebox” share is sharing the root of the drive I use the /xd switch to exclude various folders on the drive, such as the “Recycle Bin” and “Temp” folders. Neat huh? Of course, Robocopy with the /mir switch will (by default ) only copy newer or changed files, so it doesn’t waste time copying unchanged files. If I add four or five new albums to my music collection and then run the batch file, only those new albums will be copied to the server. This is *such* a time saver! Robocopy works far better than many shareware utilities that do the same thing.
Continue reading “Robocopy”