164

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?

nc4pk
  • 9,037
  • 14
  • 59
  • 71
acme
  • 621
  • 3
  • 9
  • 16
  • 1
    Related question: http://superuser.com/questions/349/how-can-i-keep-folders-synchronized-between-several-machines-over-my-home-networ – koppor Dec 07 '12 at 10:07
  • I just started using allwaysync - works like a charm – Hugo Forte Sep 16 '14 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. – Kelly Elton Mar 26 '15 at 17:06
  • Never tried this software but looks promising. http://www.techsoftpl.com/backup/index.php – Moab Dec 30 '15 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 '16 at 13:30

17 Answers17

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.

CGA
  • 3,809
  • 21
  • 15
  • 4
    Thanks! I tried it and it works like a charm, runs flawlessly on Windows 7. – acme Nov 04 '09 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 '10 at 15:16
  • Got to say its straight forward and simple. Doesnt get in the way and does the job. All other sync tools seem to be made for dumb users when I want something to run as a service every day at 8pm. – Chad Apr 09 '13 at 07:59
  • 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 04 '14 at 03:06
  • OK, never mind, I changed the folder permission to 777 on Linux, and then Dsynchronize can write files to the net drive successfully. However, a weird thing is that before I change the permission, I can write file to the net drive manually, but Dsynchronize cannot, doesn't it use the account I logged in on Windows? – Kelvin Hu Dec 04 '14 at 03:22
  • 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 07 '15 at 23:44
  • 2
    @kevinmicke - I checked out the most recent version and it looks to get flagged by [virustotal.com](https://www.virustotal.com/en/file/44cd514262a3bf3e50dbd1cb525e5b92e9123cfd3a5bbb0cee0c2f79d27112dc/analysis/) – jchavannes Jan 02 '16 at 22:01
  • I second jchavannes's finding. WebRoot, too, flagged it as a virus (W32.Malware.Downloader). – ChaimG Jun 10 '16 at 13:32
  • 1
    It worked but make sure you check the checkbox next to each path, otherwise it will not sync anything and a misleading message will be displayed that it synced up successfully because in reality, no files were selected. – zar Sep 29 '16 at 20:51
  • [Imgur](http://i.imgur.com/bmKgZ8U.png) scan with mcaffe at 2017-03-02 20:44 – Luke Mar 02 '17 at 13:44
  • It probably goes without saying but just in case, I'll mention this. This program has a lot of options. Perform some test runs before you do this one mission critical data. Setting up the options CAN destroy data. – HPWD Apr 28 '17 at 17:13
  • didn't work for me, switched to MS SyncToy, works like a charm – tomka Jul 24 '17 at 09:29
  • 1
    New link to Dsynchronize: http://dimio.altervista.org/eng/dsynchronize/dsynchronize.html – szentsas Oct 13 '17 at 00:31
  • @szentsas Your link hosts v2.34.1 while the link posted is for v2.35. This is the [v2.35 zip](http://dimiodati.altervista.org/zip/dsynchronize.zip) [analysis by virustotal](https://www.virustotal.com/en/file/32e6327fbfbdcb1ec11933f60719fe368fa1b63bd0f82f86ba6a3db913ba1e03/analysis/1512554153/). Just marked as 'unsafe' and 'suspicious'. Detection ratio 2/61. It's far more dangerous to follow the instructions that appear in many sites to "remove" Suspicious_GEN.F47V0916. – cdlvcdlv Dec 09 '17 at 12:29
  • Brilliant recommendation - Dsynchronize is beautiful little app. It does randomly crash now and again, otherwise fab. – Paul G. Dec 23 '17 at 10:54
  • `dsynchronize` does not do the real-time sync it claims to perform. It's "real-time" sync is actually a sleep-polling loop whilst real-time sync subscribes file system events and performance sync up on a matched path. In addition to the ~10 seconds delay involved, its approach also means the I/O cost & computation cost of its real-time sync is linear to the size of the monitored folder, instead of size of the change happened. – logicor Dec 05 '21 at 01:32
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.

Rizwan.A
  • 43
  • 2
  • 10
  • 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. – music2myear Oct 05 '16 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. – RubenLaguna Oct 25 '16 at 12:57
  • You can "servicify" commands with NSSM : https://nssm.cc/ – Benj Nov 06 '17 at 09:43
  • Is this really realtime, if you have to have it once per minute? – Tripp Kinetics Nov 30 '18 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 '19 at 04:45
  • This is not real-time. It does a full compare every 1 minutes even if you just use MON:1. At the end of each sync it says `Monitor : Waiting for 1 minutes and 1 changes...` – Knyri Mar 27 '19 at 14:27
22

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

Mrchief
  • 452
  • 6
  • 13
20

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

David Webb
  • 11,876
  • 3
  • 43
  • 39
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.

stolsvik
  • 1,170
  • 1
  • 9
  • 13
  • Thanks! I'll take a look at this, sounds like a good idea. – acme Jun 29 '12 at 12:31
  • -1 Sorry, just got my whole dir deleted because of this lousy sync tool. VERY BAD TOOL. – Poni Oct 03 '12 at 07:36
  • 1
    I think this is over-complicated, for wanting to just keep synched. – Menelaos Nov 20 '13 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 '13 at 21:31
  • @meewoK: If you think so, then you have no clue what you are talking about. – stolsvik Nov 20 '13 at 21:31
  • stolsvik It's interesting that your response is to make things personal by insulting me. I do know exactly what you are talking about, but your solution is not aimed at an average windows user. Your describing an eccentric option when there are other apps/options that are also easier for novices. This is also obvious because the max upvotes on your answer are 4 (as apposed to >10 for more simple/mainstream) solutions - so the community has voted. On the other hand however, I like this solution and will try it out myself. I wonder how winscp will deal with synching folders in the GB range. – Menelaos Nov 20 '13 at 23:03
  • 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 '13 at 13:49
  • @stolsvik I guess the question has been changed since then-I hate it when they do that. Windows 7 tag and quote "I want to synchronise two folders in real time under Windows 7". In any case I like the winscp way you propose, but don't know how well it scales with many folders. Question I ask here: http://superuser.com/q/678596/216440 – Menelaos Nov 21 '13 at 17:31
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
  • "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: https://allwaysync.com/license – Ashley Ross Dec 20 '17 at 09: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.

David Cook
  • 447
  • 1
  • 4
  • 11
Patrick
  • 673
  • 2
  • 7
  • 13
  • 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 07 '15 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.

Niko
  • 105
  • 3
jskye
  • 161
  • 1
  • 1
  • 7
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.

zar
  • 1,713
  • 5
  • 27
  • 43
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

Bohdan Kuts
  • 175
  • 1
  • 2
  • 12
  • 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: https://allwaysync.com/license – Ashley Ross Dec 20 '17 at 09:07
  • I've been using [Resilio Sync](https://www.resilio.com) 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. – Chris Geirman Nov 04 '18 at 20:56
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.

Jon
  • 314
  • 3
  • 8
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

Bill_Stewart
  • 1,322
  • 1
  • 8
  • 14
0

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

soandos
  • 24,206
  • 28
  • 102
  • 134
kaiser
  • 1
  • 1
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".

  • Sync Center : http://windows.microsoft.com/en-au/windows-vista/how-to-keep-your-information-in-sync – hB0 Dec 15 '13 at 19:35
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)

manuel
  • 231
  • 2
  • 5
-4

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

Code:

SUBST L: "C:\Some\Path"