How to Sync Changes Only with Robocopy

Jerry updated on Oct 25, 2024 to Backup and Recovery | How-to Articles

Windows command line directory, Robocopy sync changes only to the destination folders with certain command combinations. Let us see the detailed overview and helpful commands one can use to copy and sync files on Windows using Robocopy.

Sync helps you keep two files or folders the same at a time in different locations. Changes made to one are reflected on the other, and these copies can be helpful for backups, restore points, and more. Windows offers a Robocopy command to manage syncing files on the PC. In this tutorial from EaseUS, let's see how Robocopy sync changes only to the other file or folder. We will also learn how to automate this process with a professional tool.

Robocopy Copy Only Changed or New Files - Is It Possible

Robocopy is a robust command-based directory to copy files, folders, directories, or even one hard drive to another. Along with copying, you can use the tool for syncing tool. The utility is quite accurate and fast when mirroring files and folders of any size.

Robocopy comes with various commands to implement different use cases. Robocopy /xo is a command to copy changed files only. Upon execution, the command copy changed files only to the destination folder. This is helpful if you lose the connection or want to do an incremental and differential backup. Here are some common Robocopy commands:

  • /s: To copy subdirectories, excluding empty ones.
  • /e: To copy subdirectories, including empty ones.
  • /lev: To copy the top N levels of the source directory tree.
  • /z: To copy files in restart mode.
  • /b: To copy files in Backup mode.
  • /zb: Initially uses restartable mode, but upon denied access, uses file Backup mode.
  • /efsraw: To copy all encrypted files in EFS RAW mode.
  • /copyall: To copy all the file information. This includes the D (Data), T (Time stamps), A (Attributes), S (Security: NTFS access control list (ACL)), U (Auditing information), and O (Owner information).

If you wish to get into more details, open the command prompt and type robocopy /? the detailed information about the commands.

Is this post helpful? Share it on your social platforms, such as X and Facebook, to help more people if you find it useful!

 

How to Copy Only Changed Files and Folders with Robocopy

Robocopy works as a one-way file sync; you can only sync from one location to another with correct commands. To copy only new or modified files and folders (incremental sync), Robocopy comes with special commands. With the /xo or /xc options, you can let Robocopy sync changes only to the destination. Here is how to go for it:

Step 1. Click on the Windows icon, and search for Command Prompt.

Step 2. Run CMD in administrator mode.

Step 3. Enter any one of the commands below and click Enter. Both commands do the same work.

  • robocopy C:\sourceFolder1 E:\DestinationFolder2 /maxage:D
  • robocopy C:\sourceFolder1 E:\DestinationFolder2 /xo /maxage:D

You must specify the source and destination folder and add the /xo command to copy only changed files and folders. 

The /maxage:N denotes "Maximum file AGE" - exclude files older than n days/date. You can replace the N with a number of days.

Here are some similar commands to xo and xc for various use cases:

  • /xo: Excludes old files (excludes all the existing files older than the copy in the source directory).
  • /xc: Excludes changed files (excludes all the existing files with the same timestamp on the source directory).
  • /xn: Excludes new files (excludes all the files newer than the existing files in the source directory).
  • /mt: Enables multithread copy, and the default threads are set to 8, which you can manually specify based on requirements.
  • /xc, /xn, /xo: Robocopy excludes all existing files in the destination directory when combined.

Try EaseUS Todo Backup to Copy Only New or Modified Files

Command-line directories are always complex and difficult for most computer users to use and execute. A simple mistake can make the whole process messy. You need detailed knowledge to execute the commands. If you have no command-line knowledge or want a user-friendly approach to achieving incremental backup (only sync changed files), EaseUS Todo Backup can be a real deal.

EaseUS Todo Backup Free, a complete backup and restoration solution, offers an exclusive incremental backup feature to update only changed or new files. You can also automate the process with frequent intervals to remove manual processes. Additionally, you can automatically back up files, folders, hard drives, or the entire system and store them on the cloud. Set up the backup and click start to save space and time for the syncing.

As one of the best file sync software for Windows, this free backup software offers whatever you want. Download the software and start your backup process now.

Step 1. To begin the backup process, click the Select backup contents button.

Step 2. Four data backup categories are listed: File, Disk, OS, and Mail.

Step 3. Lists of both local and network files are shown on the left-hand side of the screen. Expanding the directory so that you can choose the files to back up.

Step 4. Follow the guidance on the screen and choose the place where you want to store the back up.

Make sure that the backup is encrypted and set the backup schedule by clicking Options in Backup Options. You can also choose to start the backup at a certain time in Backup Scheme by clicking Options. There are many other customizable options that you can look into.

Step 5. You can store the backup file either on your computer, in EaseUS's cloud service, or on a network-attached storage device (NAS).

Step 6. EaseUS Todo Backup enables customers store backup copies of their files on a third-party cloud drive or on the company's own cloud storage.

If you want to back up your data on a third-party cloud drive, select Local Drive and scroll down to add Cloud Device. Then fill in your account information.

Click EaseUS Cloud, then sign up and log in with your EaseUS account if you wish to store backup files to EaseUS' own cloud storage service.

Step 7. Click on Backup Now to start a backup.  When the backup process is done, it will display as a card on the left-hand side of the screen. A right-click will let you see more about how to handle the backup job in more depth.

To Wrap Things Up

The/xo command should be used in combination with Robocopy sync changes only. However, compared to the complex and erroneous command-line utilities, the GUI versions are much better for syncing changes only. The EaseUS Todo Backup makes it easy for users to sync two files, folders, or hard drives in Windows 11, 10, 8, and 7.

EaseUS Todo Backup is also a complete backup and restoration, making it an ideal tool for backup. You can perform incremental and differential backups, store them on the cloud, and save space on your PC. Download it now, and automate the sync between two folders.

FAQs on Robocopy Copy Only Changed Files or Folders

Here are some frequently asked questions about Robocopy sync changes only.

1. How to only copy files that have been changed or are new with robocopy?

The Robocopy command to copy only changed or new files is to use /xo /maxgae. /xo exclude older files existing in the source directory, and /max age copies the new files to the destination.

2. What is the advantage of using Robocopy instead of the regular copy and paste?

Multiple advantages: Upon encountering an error, Robocopy tries again, whereas the regular copy-and-paste does not. Also, Robocopy is way faster than conventional copy-paste.

3. What is the command to copy only new files?

Robocopy has a /maxage command to copy only the new file changes to the destination folder. The /maxage indicates the farthest modification time; it can only copy newly made changes to save time and space based on the last modification.