ThisCalculator

Everyday

Real-Time Sync for Folders in Windows

Updated · Standard formula, shown below

Real-time folder sync in Windows automatically mirrors changes from one folder to another the moment they happen, so you don’t have to run manual backups or press a sync button. You can achieve this with built-in tools, a small script, or third-party software, and the right choice depends on whether you need two-way mirroring, versioning, or just a simple one-way backup. This article explains the main methods, how they work, and how to pick one that fits your workflow.

What Real-Time Sync Actually Does

Real-time sync watches a source folder for changes—new files, edits, renames, deletions—and then replicates those changes to a destination folder automatically. Unlike a scheduled sync that runs every hour or every night, real-time sync uses the operating system’s file system watcher (in Windows, the ReadDirectoryChangesW API) to get notified of changes almost instantly. The delay is usually under a second, though some tools add a small buffer (e.g., 5–10 seconds) to avoid copying a file before it’s fully written.

There are two main modes:

  • One-way sync (mirror): changes flow from source to destination only. Deletions in the source are usually mirrored as deletions in the destination, unless you choose a “copy only” mode.
  • Two-way sync (bidirectional): changes in either folder are propagated to the other. This is more complex because conflicts (same file edited in both places) must be resolved by rules like “last write wins” or by keeping both versions.

Most people asking about real-time sync want one-way mirroring for backup or for keeping a folder on a NAS or external drive up to date. Two-way sync is more common when you work on multiple devices and need the same files everywhere.

Built-in Options in Windows

Windows does not have a single, obvious “real-time sync” button, but it has a few built-in features that can get you close, depending on your scenario.

  • OneDrive/cloud storage: If both folders are inside a synced cloud folder (OneDrive, Dropbox, etc.), the cloud client itself performs real-time sync between your local folder and the cloud, and then to other devices. This is the easiest method for most users, but it requires internet and a cloud account, and it syncs to the cloud, not directly to another local drive.
  • Storage Spaces / Storage Pool: This is not sync; it’s a RAID-like mirroring at the disk level. It keeps two drives identical in real time, but it’s for fault tolerance, not for organizing specific folders.
  • Robocopy with a loop: You can run a batch file that calls robocopy /MIR in an infinite loop with a delay. This is not true real-time (it polls every few seconds), but it’s free and requires no extra software. Example: :loop
    robocopy C:\source D:\backup /MIR
    timeout /t 5
    goto loop
    This checks every 5 seconds, but it can be inefficient for large folders because it scans the whole tree each time.

For a true event-driven sync without third-party tools, you’d need to write a small PowerShell script using FileSystemWatcher. That’s doable, but it’s more work and has edge cases (e.g., handling partial writes, renames, and network drives).

How to Choose a Third-Party Tool

If you need reliable real-time sync with a GUI, you’ll likely use a third-party tool. The market has several, ranging from free to paid. When evaluating them, consider these factors:

  • One-way vs. two-way: Make sure the tool supports the direction you need. Some free tools only do one-way; two-way is often a paid feature.
  • Filtering: Can you exclude certain subfolders or file types (e.g., *.tmp)? This is essential if you sync a folder that contains temporary files.
  • Conflict handling: For two-way sync, how does it handle a file changed in both places? Look for options like “keep both,” “last write wins,” or “ask me.”
  • Versioning: Some tools keep old versions of changed/deleted files, which is a lifesaver if you accidentally delete something.
  • Network support: If your destination is a NAS or another PC, make sure the tool works over SMB or FTP without issues.
  • Cost and license: Free tools often have limits on folder count or file size. Paid tools usually offer more features and support.

Popular free options include FreeFileSync (with RealTimeSync companion), SyncToy (older, but still works), and DSynchronize. Paid options like GoodSync, Allway Sync, and ViceVersa offer more advanced features. Always download from official sites to avoid bundled malware.

Setting Up a Real-Time Sync with FreeFileSync

FreeFileSync is a widely used open-source tool that, when paired with its RealTimeSync utility, gives you true real-time sync. Here’s a typical setup:

  1. Download and install FreeFileSync from the official website.
  2. Open FreeFileSync, set the source folder (left) and destination folder (right).
  3. Choose the sync mode: “Mirror” for one-way, “Two way” for bidirectional, or “Update” for one-way without deletions.
  4. Click “Synchronize” to run it once manually to ensure it works.
  5. Save the sync configuration as a .ffs_batch file.
  6. Open RealTimeSync (installed with FreeFileSync), load that batch file, and set the idle time (e.g., 10 seconds).
  7. Start RealTimeSync. It will monitor the source folder and run the batch whenever changes are detected.

RealTimeSync is lightweight and runs in the system tray. It doesn’t copy files itself; it just triggers the batch job. This separation is nice because you can test the sync separately.

Common Problems and How to Avoid Them

Real-time sync sounds simple, but there are several pitfalls that trip people up:

  • Files locked by other programs: If a file is still being written (e.g., a database file or a large download), the sync tool might copy a partial file. Most tools have a “wait for file to be unlocked” option or a retry mechanism. Set a small idle time (like 5–10 seconds) to let writes finish.
  • Infinite loops: If you sync folder A to folder B and also have a separate sync from B to A, you can create a loop. Avoid overlapping sync jobs.
  • Network drive disconnects: If the destination is a network share, the sync may fail silently when the connection drops. Use a tool that logs errors and retries, or schedule a check.
  • Deletion propagation: In mirror mode, if you accidentally delete a file in the source, it will be deleted in the destination. Consider using “Update” mode or enabling versioning to keep a safety net.
  • Performance: Real-time sync of a folder with hundreds of thousands of files can cause high CPU usage. Use filters to exclude unnecessary subfolders (like node_modules or .git).

Another misconception is that real-time sync is the same as a backup. It is not—if you accidentally delete or corrupt a file in the source, the sync will replicate that corruption to the destination. For true backup, you need versioning or a separate backup that retains old versions.

Comparison: Real-Time Sync vs. Scheduled Sync vs. Continuous Backup

Understanding the differences helps you pick the right approach:

  • Real-time sync: Instant replication, good for keeping two locations identical (e.g., working folder and a NAS). Risk: mistakes propagate immediately.
  • Scheduled sync: Runs at set times (e.g., every hour). Good for reducing load and giving you a window to catch errors. Risk: you lose up to the interval’s worth of changes.
  • Continuous backup (like VSS or file history): Takes snapshots or copies at frequent intervals, often with versioning. This is safer for data protection because you can roll back. Windows File History is an example—it backs up files every hour (or less) to a separate drive, but it’s not a live mirror.

For most users, a combination works best: use real-time sync for active project folders where you want immediate availability on another machine, and use a versioned backup for important files that you might need to restore from an earlier state.

Costs and Safety Considerations

Costs range from $0 (free tools like FreeFileSync) to around $30–$60 for a one-time license of a paid tool. Some tools offer free versions with limitations (e.g., 2 sync jobs, 20,000 files). If you only need one folder pair, free tools are usually sufficient.

Safety-wise, always test a new sync setup with a dummy folder before pointing it at your real data. Double-check the direction (source vs. destination) and the sync mode. A common disaster is setting up a “mirror” sync with the source and destination reversed, which wipes the destination. Also, be careful with two-way sync on network drives—if the network drops, the tool might think files were deleted and propagate that.

Finally, remember that real-time sync is not a substitute for off-site backup. If your house burns down, both your local folder and your external drive are gone. Use cloud backup or periodic off-site copies for critical data.

Frequently Asked Questions

Can I sync two folders in real time without installing anything?

Yes, you can use a PowerShell script with FileSystemWatcher to copy changes as they happen, but it’s not trivial. A simpler option is to use a robocopy loop, but that’s not true real-time (it polls every few seconds). For most people, installing a free tool like FreeFileSync is easier and more reliable.

Does OneDrive sync folders in real time?

Yes, OneDrive (and similar cloud storage clients) syncs changes to the cloud almost instantly when you’re online. However, it syncs to the cloud, not directly to another local drive. If you need to sync between two local drives, a dedicated sync tool is better.

What is the difference between mirror and update sync modes?

Mirror mode makes the destination exactly match the source, including deleting files that don’t exist in the source. Update mode copies new and changed files but does not delete files in the destination that are missing from the source. Update mode is safer if you want to keep extra files in the destination.

Can I sync a folder to a network drive in real time?

Yes, most sync tools support network paths (UNC paths like \\NAS\share). However, network latency and disconnects can cause issues. Make sure the tool has retry logic and error logging. Also, the network drive must be available when the sync runs.

How do I stop a real-time sync from running?

If you’re using a tool like RealTimeSync, you can right-click its tray icon and choose “Exit.” If you’re using a script, you’ll need to close the command window or stop the PowerShell process. For scheduled tasks, disable the task in Task Scheduler.

Is real-time sync safe for version control folders like Git?

It’s generally not recommended. Git repositories contain a .git folder with internal state that changes frequently. Syncing that in real time can corrupt the repository if the destination is also a working copy. Instead, use Git’s own push/pull mechanisms or sync only the working files (not the .git folder) if you know what you’re doing.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.