Admin Toolbox… Robocopy

This is the first in a series of posts that will present the tools that I find most valuble when doing Windows Server maintenance. One of the most useful tools I have in my toolbox is a program called Robocopy. Robocopy or the “Robust File Copy Utility” can be downloaded from Microsoft as part of its Windows Server 2003 Resource Kit Tools. It’s features are best explained by the Robocopy Help file…..
Using Robocopy, you can copy a single directory, or you can recursively copy a directory and its subdirectories. The tool classifies files by whether they exist in the source directory, in the destination directory, or in both. In the latter case, the tool further classifies files by comparing time stamps and file sizes between the source file and the corresponding destination file. You control which classes of files are copied. If a file exists in both the source and destination locations, by default Robocopy copies the file only if the two versions have different time stamps or different sizes. This saves time if the source and destination are connected by a slow network link. You can also specify that copies are restarted in the event of a failure, which saves even more time when your network links are unreliable.

Robocopy allows you to do the following:

  • Exclude directories by name or by path.
  • Delete source files and directories after copying (that is, move rather than copy them).
  • Delete destination files and directories that no longer exist in the source.
  • Control the number of times the program retries an operation after encountering a recoverable network error.
  • Schedule copy jobs to run automatically.
  • Specify when copying is to be performed.
  • Selectively copy file data.
As a Windows Server Administrator, I can’t tell you how often I have to migrate data between servers. Robocopy comes to the rescue every time. Download the Windows Server 2003 Resource Kit from Microsoft here Technorati Tags: , , , StumbleUpon It!

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

I have never used Robocopy before, but need to in order to move some data from one server to another as you have. When it runs, I need to exclude folders in the source that have the same name as folders in the destination. After reading the robocopy instructions, I have not seen a switch which does this. The /xo switch blocks files of the same name I believe, but will it block folders? thanks in advance for any insight you might have.

John

I believe the switch you are looking for is “/XD directory_name”. Using this switch will exclude all the directory and all subdirectories..

Leave a comment

(required)

(required)