XSynch advanced file synchronizer
Freeware

"Computer programmers know how to use their hardware."
On this page:

Note: I have stopped development of this software. Partly because I couldn't optimize it for speed as I wanted and partly because I hosed the codebase trying to do some major changes to it. And then I found another software that works exactly the same way: off the MS power toys, SyncToy works on pairs of directories and is one of the only software, like XSync, that can figure out moved, renamed and deleted files.

Using XSynch

This program compares the files underneath two directories (referred here as Left and Right). It can then synchronize the directories. The difference with many other similar programs is that it identifies files which have been moved or renamed and it will not copy files within a certain time difference (so as to avoid copying everything over again when there is a daylight savings change, for instance).

History:
v1.0 — 2001/08/03 — Original release
v1.1 — 2001/08/10 — Faster file search, but uses a DOS command...
v1.2 — 2001/08/24 — Added detection of hidden files. Read-only warning. Registry saved settings.
Bugs:
Probably plenty, this is an early release. Let me now if you find any. First of all, it works very slowly.
Future improvements:
Make it faster. Make it command line callable.



[XSynchMain.png]
Main view of the directory selection panel

Let's define things well:

PathName
Full path and file name. For instance C:\BaseLeft\Example\Mine\Document.txt
BaseDir
One of the two base directories to compare. For instance C:\BaseLeft
RelDir
Directory relative to the BaseDir. For instance Example\Mine
RelName
Pathname relative to the BaseDir. For instance Example\Mine\Document.txt
FileName
Just the name of the file, no path. For instance Document.txt
Extension
File extension. For instance txt

The files are compared based on the following criteria:

If the previous items are all identical, then the files are considered identical (note that this may not be true in some devious cases such as files modified more than once in a second or modified and later 'touched' to adjust the time).

If the following are different (but all the others are identical), then the files have a different status:

Different filename
File may have been renamed (we can be sure only by doing a physical verification).
Different relative path
File may have been moved (we can be sure only by doing a physical verification).
Different size
Different files, not a normal situation and don't know what to do.
Different time
One file is newer than the other. If the difference is lower than a certain threshold, then the difference may be due to wrong handling of time by the operating system (daylight saving changes, time changes...): in other words, the files may be truly identical but the times reported by the operating system(s) are different (we can be sure only by doing a physical verification).


[XSynchDisp.png]
Listing of the differences between the files

Program options include:

Ignore Case
This is the normal operating mode, but if you need to compare directories located on a Unix mcahine that allows stupid things like files called File, file, FILE and fILE in the same directory, then you'd better not ignore the case of characters.
Daylight savings specification of each base directory
This is used if you want to compare two directories that are on machines in different countries for instance. In the future I will probably add a time zone correction, but this is hard to use properly anyway.
Extension to ignore
Will ignore files with the extensions selected (separate them with a space, for instance "tmp bak wbk jbf db" will ignore the files file.tmp but not file.backup.1)
Path to ignore
Specify elements of the relative pathname to ignore. For instance if one of the base directory is C:\BackupCD\Dir1 and you want to ignore "backup temp", then it will ignore the files C:\BackupCD\Dir1\SubDir\Temporary\File1.txt and C:\BackupCD\Dir1\SubDir\Serious\File1.temp but not C:\BackupCD\Dir1\SubDir\Serious\File1.txt.
Look for hidden files
If this option is activated, the program will also synchronize hidden files and directories. Otherwise it will just ignore them.
Physical verification
This action will compare the files where there is a doubt about the equality of the files (possible moved files, possible renamed files or files within time tolerance). Note that this may take time. You should perform a physical verification if speed is not an issue, if you have fast local drives or if the files are important. Otherwise you can decide to synchronize without checking... Note that when you perform a physical verification of files that are within the time tolerance, in case they are physically identical the time of the files on one side will be adjusted to reflect the other side.
Windiff
You can run Windiff (a Microsoft program that normally comes with Windows) on a pair of directories (use [File][Windiff]) or a pair of files (right-click on one) to see where the differences lay.


[XSynchConf.png]
Confirmation panel before any action is taken

How to proceed to obtain identical directories:


Support my site: make a donation, buy images, use associate services
Download: Yes ! Yes ! Yes ! Where is it ? I want to download it now (1Mb) !

Warning! This is an early release and I'm still ironing bugs out (or rather, squashing them with a big crowbar), so don't use this program on your entire Hard Drive. You have been warned.


Note 1: this program works on local drives and local network drives. If you want to use it wih FTP sites, I recommend installing WebDrive, a program that will turn an FTP site into a virtual drive.

Note 2: if what you want is a way to do incremental backups, you should lookup the advanced DOS command RoboCopy with the /MIR option. It does a great job for instance to extract specific files off a directory structure. RoboCopy is part of the Resource Pro Kit for Win2000. For instance to do monthly backup copies of my scientific data I use the following command (yes, it's just one command): robocopy /NP /S . "%4" Motherboard*.log DATA???.DAT *CR10*.DAT *CR23*.DAT *%2%1.r Lidar20%1%2*.txt DomeC???20%1%2*.?? MF20%1%2*.png 0mtp20%1%2*.??? Concordia_20%1%2??_??????.dc3db Alias%1%3??_????.png AltMax%1%3??_????.png Fax%1%2??_*.png FFT%1%3??_????.png RWF%1%2??_*.png Tfc%1%3??_????.png Vector%1%3??_????.png WindProf%1%3??_????.png WindProfile%1%3??.txt %1%3?????.??? ??%3%1n??.??a %1%3??_*.tfc Avr%1%3??_????.png ConcordiAWS.??? Archive20%1???.txt Archive20%1-week*.txt Archive20%1%2??.txt 20%1%2??.avi /XF *.bak *.jbf Thumbs.db /XD AWS-10min AWS-3hour AWS-Australian Inst Realtime Webcam Webcam2

Note 3: an even better solution is to use the Unix/Linux rsync command line utility. It's optimized for network transfers and transfers only the difference between the files, making for some incredibly efficient transfers, compressing and encrypting on the fly. If you are on Windows you can still use rsync as a compiled for DOS utility or, much better, as part of the excellent cygwin package.

Note 4: If you want to keep two (or more) directories in sync, even remotely, used Unison, which is based on the rsync protocol.

This freeware written with LabWindows/CVI.



Synchronizing two remote PCs

So basically my XSynch program is used to synchronize two machines, like your home PC and your work PC. How can one access the work PC from home ? First make sure some files are shared on your work: right-click [My Documents], and add a share as yourself with R/W access. Make sure the username and password is the same on both machines. Find out your IP address (type IPCONFIG in a DOS window) and your computer name do [Start][Settings][Control Pannel][System] and then [Network Identification][Properties]) and check it out by going to explorer and typing either \\IPaddress or \\ComputerName in the explorer bar. You should be able to access the share (This is the Netbios protocol at work on the local network).

Now try the same from home: \\IPaddress or \\CompName in the explorer bar. If you get an error on both, then the netbios port is likely blocked (we'll see about that later). If you see it, you are done: you can use \\IPaddress\My Documents or \\IPaddress\C$ as a remote destination in XSynch (try to open the destination first in Explorer).

If it does not work, it's likely that your home and/or work network forbids Netbios, which is a common and healthy security practice. The way around that is to use VPN tunneling (Virtual Private Network): a direct encrypted link to your work machine... First you need to setup a VPN server on your work machine (I'll assume Win2000 here). [Start][Settings][Network...][Make New Connection], [accept incoming connection], do not select [Direct Parallel] but click next, [Allow Virtual connections] and then follow the indications.

Now on the client side (your home PC), it's a little more complicated: [Start][Settings][Network...][Make New Connection], [Connect to a VPN through the Internet], give the IP of your work machine and then look up the advanced setting and disable the [Dial another connection first]. If you activate it by going to [Start][Settings][Network...][Connect to VPN or whatever you called it], you'll notice that you can now access the exported folder (try \\IPaddress\C$ or \\ComputerName\C$, the username and password must be the same on both machines, otherwise type in a DOS window: net use \\IP\Dir /user:username). If your normal internet connection works (Internet Explorer, email...), you are done, otherwise keep reading.

If other connections are not available while the VPN in on, that's because all connections are now tunneled through the VPN. Let's change that. Open a DOS window and type ROUTE PRINT. The first line is your past default connection (0.0.0.0 ... Metric=2) and the second line is the tunneling (0.0.0.0 ... Metric=1) which now overrides it. We want to remove the second one: ROUTE DELETE 0.0.0.0 MASK 0.0.0.0 GATEWAY #.#.#.# with #.#.#.# being the gateway number given on the 2nd line of the ROUTE PRINT. Your normal internet connection should be back up.

I hope this is clear enough since I'm still confused about some of the issues.