165

I want to synchronise two folders in real time under Windows 7.

Basically, I want to monitor a folder and synchronise each change (new files, changed files, deleted files) to another drive. It has to be in real time, so it gets synchronised instantly when a change happens. A one-direction synchronisation is enough.

I tried Microsoft's SyncToy, but it does only syncing by hand or scheduled (thus not satisfying the "real-time" requirement).

Can this be achieved with Windows 7 itself? If not, are there other methods of doing this?

5
  • 1
    Related question: superuser.com/questions/349/…
    – koppor
    Dec 7, 2012 at 10:07
  • I just started using allwaysync - works like a charm
    – Hugo Forte
    Sep 16, 2014 at 13:32
  • 1
    The nice thing about using a pure windows solution is that the windows api has events you can hook into to get an event the moment something changes, which is much less error prone than scanning files/directories like some open source tools do. Mar 26, 2015 at 17:06
  • Never tried this software but looks promising. techsoftpl.com/backup/index.php
    – Moab
    Dec 30, 2015 at 21:33
  • Instead of syncing folders, you may just need to create a symbolic link using the built-in MKLINK command. It makes files and folders appear to be in two places at once even though it's really only in one place.
    – ChaimG
    Jun 10, 2016 at 13:30

17 Answers 17

95

Dsynchronize lets you do this. I'm not sure how it works in Windows 7 but it's freeware and standalone so there's no harm in trying.

16
  • 4
    Thanks! I tried it and it works like a charm, runs flawlessly on Windows 7.
    – acme
    Nov 4, 2009 at 14:13
  • 2
    I'm running this for nearly a year now. It's working quite well, though it's not syncing correctly if a large number of files is changed within a few moments (e.g. when unzipping or checking out a repository). But as I've not found something better, I'll still stick with it.
    – acme
    Sep 17, 2010 at 15:16
  • 1
    This is a great tool, but when I mapped a Linux samba folder to drive Z: using net use command, the files cannot be synced from Windows local folder to Z:, it reports "Access rights error", has anyone met this before?
    – Kelvin Hu
    Dec 4, 2014 at 3:06
  • 5
    After downloading Dsynchronize.zip from the link in this answer, 360 Internet Security flagged it as having the following risk: "Trojan (HEUR/QVM11.1.Malware.Gen)". The 57 upvotes make me think the trojan is possibly a recent addition (or a false positive), but it's not worth it to me to try. Sorry to have to downvote, but the "no harm in trying" doesn't seem applicable anymore.
    – kevinmicke
    Aug 7, 2015 at 23:44
  • 2
    @kevinmicke - I checked out the most recent version and it looks to get flagged by virustotal.com
    – jchavannes
    Jan 2, 2016 at 22:01
37

I use the ROBOCOPY command and made a command line to do the sync between two folders (incremental sync).  My command is like this

ROBOCOPY "Source_Folder" "Destination_Folder" /E /ZB /XJ /XF "~*.*" "*~.*" "desktop.ini" "Thumbs.db" "*.torrent" ".lock" ".Sync*" /xd "Rubbish" ".Sync*" ".Box Sync" "_private" "Outlook Files" /FFT /MT /R:2 /W:5 /V /MON:1 /TEE

(exclude files: "~*.*", "*~.*", "desktop.ini", "Thumbs.db", "*.torrent", ".lock", and ".Sync*") (exclude folders including files in these folders: "Rubbish", ".Sync*", ".Box Sync", "_private", and "Outlook Files").  Also this repeats itself every minute and/or single change of file/folder.

FLAGS

/E      Copy subdirectories, including empty ones.
/ZB     Use restartable mode; if access denied use backup mode.
/XJ     Exclude junction points. (normally included by default).
/FFT    Assume FAT file times (2-second granularity).
/MT     Do multi-threaded copies with 8 threads.
/R:2    Number of retries on failed copies.
/W:5    Wait time between retries.
/V      Produce verbose output, showing skipped files.
/TEE    Output to console window, as well as the log file.
/MON:1  Monitor source; run again when more than 1 change seen.

/XF [files]  Exclude files matching given names/paths/wildcards.
/XD [dirs]   Exclude directories matching given names/paths.

For the list of flags, please refer to The Ultimate Guide to Robocopy.

6
  • 2
    Works, and works nicely except for the whole command window up on my screen thing. I know there's ways to run it in the background or servicify it, and I'll check into those. Oct 5, 2016 at 17:17
  • For reference /MON:1 monitors source and rerun the copy if there are 1 or more changesand /MOT:1 means monitor source and reruns in 1 minute if there where changes. I guess that /MON:1 is enough. Oct 25, 2016 at 12:57
  • You can "servicify" commands with NSSM : nssm.cc
    – Benj
    Nov 6, 2017 at 9:43
  • Is this really realtime, if you have to have it once per minute? Nov 30, 2018 at 22:08
  • /MON will not remove files if they are deleted from source. For this, you can add /PURGE to the end, to get equivalent functionality to /MIR, with monitoring.
    – Shane
    Mar 19, 2019 at 4:45
22

There's Synkron which is open source and is cross platform.

4
  • 1
    But does it sync in real time?
    – acme
    Oct 23, 2012 at 10:37
  • Doesn't look like it :( May 20, 2013 at 5:04
  • 3
    This is what is just needed. I don't need it to be real time but like the depth of options this tool provides, creating a schedule works just fine. This tool does support syncing every 1 minute which is pretty close to being real time! Dec 5, 2013 at 21:36
  • How to use wildcards for folders blacklist?
    – The One
    Mar 5, 2019 at 16:09
20

You could use a NTFS Symbolic Link so that the folders on each drive actually point to the same folder.

6
  • That's an interesting approach, but I guess it won't work here, the mapped drive (the sync-target) is Linux.
    – acme
    Nov 4, 2009 at 14:12
  • 3
    You can create a NTFS symbolic link to a Samba path, I have several on my desktop to my Ubuntu file server. Nov 2, 2011 at 18:53
  • 7
    This solution could fit if you're not looking for data physical replication.
    – vegatripy
    Aug 13, 2014 at 13:02
  • 6
    Doesn't full fill my need to copy files on a ram disk back to an SSD. Nov 5, 2015 at 8:09
  • This won't work for deleting. I.e. if you delete the entire symlink folder, the original is untouched.
    – jiggunjer
    Dec 23, 2016 at 6:44
17

Since I read your comment ".. the mapped drive (the sync-target) is Linux", then I want to give you a way better approach: You only need ssh-access on the Linux target, it is way faster, and works much better over lower bandwidths and longer latencies.

Use WinSCP's "Keep remote directory up to date" function!

You will need a little tweaking on the transfer options to set up always binary, exclude files (typically svn or git files and similar) etc. Also use the "automatic apply" of transfer options. Also, create a session that has the host, local and remote directories set up. At that point, you only need to open WinSCP, activate the session (which then also automatically applies the transfer options due to e.g. host-matching), and hit the keep-updated button.

Or you could script this using WinSCPs scripting tools!

.. and just btw: If the scenario was Unix-to-Unix, then check out this question.

8
  • Thanks! I'll take a look at this, sounds like a good idea.
    – acme
    Jun 29, 2012 at 12:31
  • -1 Sorry, just got my whole dir deleted because of this lousy sync tool. VERY BAD TOOL.
    – Poni
    Oct 3, 2012 at 7:36
  • 1
    I think this is over-complicated, for wanting to just keep synched.
    – Menelaos
    Nov 20, 2013 at 11:20
  • 3
    @Poni: You can cut yourself with a knife too. It is NOT the tool that is at fault here, dude! :-D
    – stolsvik
    Nov 20, 2013 at 21:31
  • 1
    @meewoK: He asked for real-time synch, and he mentioned that the target was a Linux-box. I found the samba-solution (mounting Linux on windows) to be WAY to slow over slow lines, while SCP-solution is quick. Using WinSCP was the only option I found that satisfied my own needs, and it does that pretty good. I wanted to share this. It is very simple to set up the initial synch: Just point left side to local, and log in and navigate remote on right side, and then hit synch. In addition I just mention a couple of extra features that makes the setup quicker - that might seem to complicate things.
    – stolsvik
    Nov 21, 2013 at 13:49
11

Below are some of the tools for synchronizing folders in real time, check each and select one for your requirement.

  1. FreeFileSync
  2. AllwaySync
  3. SyncBack Free
  4. Synkron
  5. File Synchronizer
  6. PureSync
  7. GoodSync
1
  • "Customer agrees that Allway Sync Free has certain limitations and that these limitations may change over time without notice or obligation on the part of Developer. Currently, the limitations may not allow Customer to process more than 40,000 files in any consecutive 30-days." -- Allway Sync License: allwaysync.com/license Dec 20, 2017 at 9:07
7

My I've tried quite a few programs and the only ones that do real-time mirroring of folders are:

Personally, I like Yadis! Backup better. It has more features than Dsynchronize. You can enable versioning, # of versions to keep, which file operations to monitor, and I'm sure a lot more. Plus, it has a better looking GUI that looks more refined.

1
  • 1
    Yadis! Backup is great: real-time updating is fast, interface is friendly, lots of option, and no trojan. As I commented on the accepted answer, after downloading Dsynchronize.zip from the link in this answer, 360 Internet Security flagged it as having the following risk: "Trojan (HEUR/QVM11.1.Malware.Gen)".
    – kevinmicke
    Aug 7, 2015 at 23:56
4

If you want to sync a folder to USB and you use Dropbox already, use the DropboxPortableAHK.

This way, I have my Dropbox files synced on any computer, as well as my iPhone using the Dropbox app and my USB drive I use at uni with this portable version.

2
  • Dead link. Appears to have moved to nionsoftware.com/dbpahk
    – JYelton
    Apr 2, 2013 at 22:25
  • And surrender your privacy completely by having important docs on a a system that has been compromised multuple times.
    – Menelaos
    Nov 20, 2013 at 11:21
1

Another very strong way to sync folders is to use rsync on command line. You will have to download MingW toolchain or if you install cwRsync, it installs rsync.exe that you can run directly.

All you would need is this command:

rsync -r source_path destination_path

-r flag is to recursive for all sub folders.

On Windows (7) the path should be provided in the following format. For example to specify c:\test it will be /c/test or /cygdrive/c/test

This is the most efficient, fast and powerful way to sync folders with large files even though Dsynchronize in accepted answer also worked for me.

It is not live or real time though. Everytime you need to sync, you will run this command.

1

Maybe this one will help you: Allway Sync. Thare are free* and pro version. Features:

  • Flexible configuration and customization.
  • Supports files of any size.
  • Easy-to-use graphical interface.
  • Supports virtually any file system (FAT, NTFS, SAMBA, Netware, X-Drive, CDFS, UDF and more).
  • Can be installed on a desktop, laptop, USB stick, external HDD or a U3-enabled device.
  • Capable of synchronizing more than 2 folders.
  • Synchronize data between your desktop PCs and laptops over network

I used this program and I liked it.

* - free version has a limit of files processed during every 30 days. See Allway Sync End User License Agreement

2
  • 1
    "Customer agrees that Allway Sync Free has certain limitations and that these limitations may change over time without notice or obligation on the part of Developer. Currently, the limitations may not allow Customer to process more than 40,000 files in any consecutive 30-days." -- Allway Sync License: allwaysync.com/license Dec 20, 2017 at 9:07
  • I've been using Resilio Sync and it works great, especially across networks. It syncs fairly quickly too, but not fast enough for web development. I have a virtual box with a shared folder that I need to sync to a local folder which is the root of the website. I'll give Allway Sync a try. It's interface is pretty straight forward at least. Nov 4, 2018 at 20:56
0

You can try SyncBack4all, it's real time folder and files sync program.

1
  • 1
    Except it isn't free.
    – Paya
    Jul 20, 2012 at 7:20
0

Watch 4 Folder v2.3 - a small (802kb), portable (no installation) and powerful monitoring tool to monitor folders and files activities.
It is simple to use and to set, it can monitor 15 types of events and trigger different actions in case an event occurs.

http://leelusoft.blogspot.in/2011/10/watch-4-folder-23.html

-Been using it on a server, firing off multiple exes - conversion to PDF using Acrobat, stamping them, sending as attachment to offices around the country through smtp calls... little software does many things!!

0

I wanted the same. And in principle the Sync Center within Windows7 would provide that but in another fashion: you only have to set a network folder as Always Available Offline. With this you basically have that a local and remote version synchronized, you are working as if you were on the network but actually it manages to have it locally. In other words you only see one copy but having it in two places, but that is the goal of synchronizing. Instead of being transparent that there is a remotely synchronized copy, there is a locally synchronized copy. In any case this covers the basic goal of network failures.

I must say this is the theory because I got stuck since my network drives are managed by Novel and therefore I don't have the option of "Always Available Offline".

1
0

I use free syncless https://code.google.com/p/big5sync/

it hooks to system and if in seamless mode, sync files in real time. Can't run as service, personally don't like GUI but it works :)

MirrorFolder http://www.techsoftpl.com/backup/ can also do real time sync and it works as service (do not need GUI to load to work) but it's not free ($39)

0

I have found FreeFileSync (open source - but watch for adware on install) the best.

I also really like Backup2 (https://bvckup2.com/) for larger tasks as it runs the fastest of anything I've tested, but it's not free and is meant for 1-way syncs only.

0

I realize this answer is a bit late, but some may be interested in trying Syncthing, which provides near real-time file synchronization.

I wrote a Windows installer for it that lets you install for all users (installs as a service) or for the current user (adds a logon task to the Task Scheduler to start it at logon):

https://github.com/Bill-Stewart/SyncthingWindowsSetup

-4

You can assign a folder path to a drive with subst.

Code:

SUBST L: "C:\Some\Path"
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .