Robocopy – Best Damn Windows Comand line Copy Util!

I’m a huge fan of the windows robocopy program.  It allows you to perform migrations and copies between servers. Recurvsive copy capabilities are included as well as copies based on file archive bit settings.

Basic Robocopy syntax:

robocopy <source dir> <destination dir> <file> <options>

Copy 1 file:

robocopy c:\test\ d:\test move-this-file.txt /z /r:1 /w:1 /v /eta /e /L

/z = copy the file in restartable mode… if the file copy breaks it will just pick up where it left off.

/r:1= When copying a large number of files and or folders I always set the retry count to be really low. That way if it gets hung up on a file it just skips it.

/w:1= Same as /r except this pertains to the wait timeout. ie. if there is a ton of latency the file is skipped.

/v = show output on screen during the copy

/eta = show me how long it expects the copy to take

/e = recursively copy all sub folders and files including empy ones empty directories.

/L ALWAYS use /L before running any robocopy script or command. It will show you what is going to be copied by the command being run.

Robocopy is included in the Windows 2000+ Resource pack which can be download in my Utilities link found at the top of the page.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s