• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Robocopy (Robust File Copy)

Page history last edited by Monica 11 years, 1 month ago Saved with comment


 

General

A command method commonly used to transfer data from one storage array to another. To batch copy large numbers of folders, sub-folders and all their contents. This command will actively mirror one location to another (which is a better method than drag and drop from Windows Explorer for complex file arrangements).  It can also provide a report on files /directories failed to copy.

 

When to use

In cases with complex folder structures, large file sizes and with lots of individual files. For a single 1 GB file, one should just use windows drag and drop. A good use case example for this command is the Thresher project: approximately 900 GB content, spread across close to 3,000 sub-folders and over 80,000 individual files. If an interruption in the transfer operation occurs, this structure is too complex to figure out where in the process the interruption happened. The robocopy command allows recovery options to auto-start where the transfer process was stopped (/z  option) as well report detail status (/v option).

 

Tips

  • use separate computer than local desktop to avoid any accidental interruptions
  • do not use same computer for more than one robocopy action 
  • preferable to not  run robocopy action over night as the operation might be stopped due to regular server backup or other cron jobs
  • preferable not to run other processes at the same time (e.g. batch conversions of tifs to jp2)

 

Note on processing time

  • Speed of copying is dependent on hardware setup. For example a USB2 connection can only transfer 480 megabits per second.

 

 

Command and options

 

robocopy source-path destination-path /z /v /e /log:C:\myLog.txt /tee /fp /w:5

 

  • do not include ending backward slash in source/destination path 
  • Post copy, from windows explorer, compare properties stats (overall size, # of files/folders) to confirm transfer is complete.

 

Options

 

/z

Copies files in Restart mode. (Key for restoring copy function if operation is interrupted or incomplete for any reason. )

/v 

Produces verbose output, and shows all skipped files. (see screen shot below)

/e

Copies sub-directories. Note that this option includes empty directories.

/log:<LogFile> 

Writes the status output to the log file (overwrites the existing log file).

/tee

Writes the status output to the console window, as well as to the log file. (helpful to view onscreen for quick view of status. shows exactly where in the cue the operation is. Can also check the destination folder fpr increase in overall size)

/fp

Includes the full path names of the files in the output.

/w:<N>

Specifies the wait time between retries, in seconds. The default value of N is 30 (wait time 30 seconds).

/s Copies sub-directories. Note that this option excludes empty directories. (good practice is to use /e and capture all directories, especially from donations or gifts when contents is unknown)

 

Figure: Example of Output Report (/v)

 

 

 

Local Example

 

robocopy Z:\Thresher\2012-project-1916-2000\thresher-1983-2000\  F:\thresher-1983-2000\ /z /v /e /log:Z:\Thresher\2012-project-1916-2000\myLog.txt /tee /fp /w:5

 

Source = Z:\Thresher\2012-project-1916-2000\thresher-1983-2000\
Target = F:\thresher-1983-2000\

 

For more information on other Robocopy Options and Switches

 

Comments (1)

Monica said

at 3:06 pm on Mar 31, 2017

tiny url to this page http://tinyurl.com/ke9esag

You don't have permission to comment on this page.