Go Go Gnome
the website of Sander Kooijmans

Dirsynch

Posted: July 18, 2005
Last modified: December 23, 2020

What is it?

Dirsynch is a tool for synchronizing directories. Directories to be synchronized can be located on a computer's file system or on an FTP server. Personally, I use the tool to upload new versions of my homepage to FTP servers.

What exactly does synchronization mean?

Imagine two directories, named SOURCE and DESTINATION. Each of these directories may contain a number of files and subdirectories. Typical examples of a SOURCE directory is a collection of HTML files and images located on a computer's file system. Together these files constitute a website. A typical example of a DESTINATION directory is the location at the FTP server where these files should be uploaded to make it available on the Internet.

The result of synchronization is that all files in DESTINATION are exactly the same as the files in SOURCE. This could be obtained by deleting all files from DESTINATION and then copying all files from SOURCE to DESTINATION.

However, copying all files might consume a lot of time and, when using a slow modem to upload files to an FTP server, a lot of money. When maintaining a website, typically a few files change per day or week.

A smarter way to synchronize is to just upload the files that have been created or changed since the previous synchronization and delete the files that have been deleted from the SOURCE directory since the previous synchronization. This is exactly what the dirsynch tool does.

The dirsynch tool allows both SOURCE and DESTINATION directories to be located on the computer's file system or on an FTP server.

Requirements

The single requirement is a Java runtime or Java SDK must be present. Java 4 or higher is required. Here is a link to download Java from the website of Oracle, the owner of Java. Java can be downloaded from other websites too, but then possibly unwanted toolbars for your browser might be installed too.

Download

Feel free to download the dirsynch tool. Click here to download version 0.6 of the tool.

Using dirsynch

After unzipping the downloaded file, you can start the tool giving the following command in a command prompt or shell:

java -jar dirsynch.jar

If the tool is not supplied with any arguments when started, it shows the usage instructions.

The basic usage of dirsynch is:

java -jar dirsynch.jar <SOURCE> <DESTINATION>

Both <SOURCE> and <DESTINATION> need to be replaced by a path on local file system or on a FTP server. For locale file system use the notation file://<path to file>. For FTP use ftp://<username>:<password>@<host>/<path on FTP server>.

Releases

Release Date Remarks
0.6 July 18, 2005 Fixed bug that prevented FTP file systems to be searched when directories are nested deeper than 2 levels.