Program © 1998-2013 Guillaume Dargaud. Free use and distribution.
Last updated on 2012/12/13
"Computer programmers know how to use their hardware."
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.
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).
Let's define things well:
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:
Program options include:
How to proceed to obtain identical directories:
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.
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.