How to Create SyncToy Batch Script For Background File Sync

This requires just a single line of code

Reading time icon 2 min. read

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

synctoy batch script

SyncToy is a legacy but useful tool that can sync files locally, and many are wondering how to make a SyncToy batch script. In this guide, we’re going to show you the best ways to do it.

How can I create a SyncToy batch script?

Use Notepad

  1. Open Notepad.
  2. Paste the following code: "C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R
     notepad batch file
  3. Click on File and choose Save as.
    save as notepad
  4. Set Save as type to All files. Enter sync.bat as the name of the file and click on Save.
    sync.bat save as type all files
  5. Now run the newly created sync.bat file to sync your files.

Do keep in mind that this script will sync all folder pairs. If you want to sync a specific folder pair, use the following code instead in step 2:

"C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R “WindowsReport”

Replace WindowsReport with the name that matches your folder pair.

After you create a batch script, you just need to double-click to run it and SyncToy will sync your files in the background.

More advanced users can assign a keyboard shortcut to the script or use Task Scheduler to run the script at the specified time of the day.

If you’re not familiar with SyncToy, it offers limited customization options, but you can easily change folder path in SyncToy or exclude folders in SyncToy if needed.

It’s worth mentioning that this tool has its share of issues, and we already wrote about Cannot access internal metadata error in SyncToy in our other guides.

More about the topics: Windows 11