Robocopy is a robust file copying program built into Windows similar to UNIX rsync. It is a much better method of copying large datasets or lots of files across volumes and is a great tool for backing up data. It has the ability to resume copies if interrupted, various options and logging during copying. Using a scheduled task can automate this, so backups are done every night, without interaction from you.

COE IT has created a script (below) that can be modified and used to your specific needs to aid graduate students who wish to have an easy way to back up files from local computer storage to external disks, or to our backup server "attic". 



SET _source=C:\temp
:: Change C:\example_source to the directory you want to copy from

SET _dest=E:\
:: Change X:\example_dest to the directory you want to copy to

SET _what=/COPY:DT /E
:: Sets specific copy instructions
:: See readme for more details

SET _options=/LOG:C:\temp\example-log
:: Log file specifications
:: See readme for more details

ROBOCOPY %_source% %_dest% %_what% %_options%
:: Starts ROBOCOPY

attrib -s -h %_dest%
:: Removes System and Hidden Attributes from copied files


Download a pre-made batch script here.

  1. Unzip the .zip archive
  2. right-click and 'edit' the robocopy_example.bat
  3. change your source directory to the directory you want to copy files from
  4. change your destination directory to the directory you want to copy files to
  5. Save and Close the file
  6. Double-click the .bat file

Please note that if you would like to change the name of the robocopy_example.bat file, it cannot be named "robocopy.bat", this will cause it to fail.

Advanced Users: If you have a specific way you want your files copied and want to change the options for the way the robocopy runs, refer to the ReadMe included in the .zip

Full Microsoft robocopy documentation can be found here:

...Robocopy with Scheduled Tasks

You can create a scheduled task to automatically run your robocopy script at a specified time.

For example, scheduling it to back up your C:\work_example_directory to X:\backup_example at 6 p.m. every night

Create a Scheduled Task

  1. Search for and open "Computer Management"
  2. Expand "Task Scheduler" 
    Task Scheduler
  3. Right-click inside the tasks list and choose "Create New Task"

General Tab
Give your task a name and description on what it does, for the Security options, make sure that your user account is set to run the task, and that the radio button for "Run only when the user is logged on" is selected

General Tab

Triggers Tab 
Create a new trigger 
Select when you want the task to begin, "On a schedule" is a good option to start 
Change the Settings to how often you want to run the task and when (date and time) you want it to start and reoccur 
Advanced settings allow some additional options 
Click OK when finished to create the task 

Actions Tab 
Create a new action 
Action: Choose "Start a program" 
Settings: Program/script: "C:\temp\robocopy-example.bat" 
This is telling Windows to run "C:\temp\robocopy-example.bat" in Windows command prompt. Change the path and filename inside the quotes to match where your script is located and what it is named. It is recommended to keep the path/filename short and avoid spaces. 

Conditions Tab 
Additional options should you choose to use them. Defaults generally are fine for most tasks. 

Settings Tab 
Additional options should you choose to use them. Defaults generally are fine for most tasks.