Go Go Gnome
the website of Sander Kooijmans

Gogo Dirsynch

Posted: June 28, 2023

What is it?

Gogo 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 various websites 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. 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 Gogo Dirsynch does.

Gogo Dirsynch 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 9 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

Click here to download Gogo Dirsynch 2.0.

Usage instructions

To run the Gogo Dirsynch, type the following command from a shell or command prompt:

java -jar gogodirsynch.jar [-help] [-ignore <regex pattern>] [-showChangesOnly] [-ignoreTimestamps] SOURCE DEST

Here is the explanation of the arguments:

-help              shows a help message
-ignore            a regular expression of files or directories to ignore
-ignoreBackups     ignore backup files (*.bak and *~ files)
-showChangesOnly   only shows changes; DEST is not changed
-ignoreTimestamps  ignores timestamps of files; all files of SOURCE 
                   will be copied to DEST
SOURCE             the source directory
DEST               the destination directory that has to become the
                   same as the source directory

SOURCE and DEST must be specified as URLs. Here are examples URLs:

file:///home/sander/homepage    
ftp://<username>:<password>@yoursite.com

Releases

Version Date Remarks
2.0 June 4, 2023 Upgraded dependecies, upgraded to Java 9, changed command line arguments, bug fixes.
0.6 July 18, 2005 Fixed bug that prevented FTP file systems to be searched when directories are nested deeper than 2 levels.