FSYNC - Program to Synchronize Windows Directories

Glenn Story

Version 11.0 -- 12/27/2002

Please send comments to Glenn Story at glenn.story@gmail.com

Download the file from here.


FSync is a program designed to synchronize the files between two directories. After FSync has synchronized a pair of directories, the files in the two directories should be identical (except for files you deliberately choose to skip, and files that, for security or other reasons, can't be accessed).

FSync can synchronize the following types of directories:

How to Install FSync

How to Run FSync

How to Install FSync

Follow these steps to install FSync.
  1. Get a copy of FSYNC.ZIP .
  2. Unzip the file into a temporary directory, producing the following files:
  3. Run "SETUP" from the directory into which you have unzipped the files.

NOTE: If you are using WinZip, you can combine steps 2 and 3 by simply clicking "Install" from the WinZip wizard bar in standard mode. In Wizard Mode, WinZip can also perform these steps.

How to Run FSync

Starting FSync

Specifying Directories to Synchronize

The File List

FSync Actions

Editing the File List

Merging two files

FSync Options

Specifying Automatic Options

Excluding File Extensions

Excluding Directories

Automatic (unattended) Operation

Starting FSync

FSync can be run in one of five ways:

The first two methods will start an FSync session from which you can start a new document, or open an existing one. The last three methods will open an existing document.

In the last method, the "-q" stands for quick mode. FSync will automatically do a scan. If the scan shows no files need to be updated, FSync will exit immediately.

The File List

FSync controls most of its actions from a file list. (An FSync document stores this list for use from one session to the next.) You build and update this list by selecting "Scan" or "Sync all files" from the "Sync" menu.

Each entry in the file list contains the following items:

Specifying Directories to Synchronize

You specify the directories to be synchronized using this dialog box:

You can specify each of the directories in one of the following formats:
Type of directory
Example syntax
Files on local and network drives
UNC names
Files on an FTP server
ftp://hostname/some/dir (See note.)

Note: The full syntax for FTP directories is:


where "[" and "]" are metacharacters enclosing optional components. Thus the following are all valid:

Warning:Although the last two forms (showing the password) are valid, they are not recommended because the password will be shown on the screen and stored in the clear in the FSync data file.

FSync Actions

This section describes the actions that FSync can take to synchronize files. These actions can all be specified from items on the "Sync" pull-down menu.
This function will scan all files in the two directories and compare their states to the saved states in FSync's file list. It will set a new action for each file as described in The File List above.
Edit File List
This will allow you to view and make changes to the File List and the actions specified for individual files therein. This process is described in more detail below.
Sync from list
This function will synchronize each file in the file list based on the file action set on the previous scan, or as set by you via the edit function.
Sync all files
This function combines the actions of "scan" and "sync from list". The files are scanned and compared to the file list, and then immediately synchronized.
Sync one file
This function will allow you to synchronize one file. It will first display a standard file dialog box for you to select a file. It will then add the file to the list if it is not already there. Next it will let you change the current action for the file, and finally it will sync the file.
Set Directories
This function lets you respecify the directories to be synchrononized. (Since this makes the contents of the file list questionable, you should perform this action with caution.)
Show scan summary
Whenever you select "scan", a summary is displayed of the current actions set for the files in the file list. If you would like to display this information at some other time select this function. Note that this will display the current information, not necessarily the information at the last scan.
Stop scanning or syncing
This function will terminate the current scan or sync function. Normally, FSync will stop what it is doing immediately and return to a "ready" state. However, there are two situations where FSync will request further information from you:
  1. While Scanning: You will be given the opportunity to consider the current scan up to date (i.e. the information recorded for the previous scan or sync is still up to date). You should use this feature with caution. Only consider the current scan to be up to date if you know with certainty that the files being scanned have not changed; otherwise, your sync operation may omit files, or you may get errors for attempting to access files that are no longer present.
  2. While copying a file: You will be give the option to terminate the sync operation immediately or deferring the stop until copying the current file is completed. You should normally select the latter so as not to end up with an incomplete file at the destination location.
Reset all
This function will mark all files in the list as up to date without actually moving any files. This is sometimes useful for creating a new file list when files already exist (and have been manually synchronized) between the two directories.
This will bring up an options menu that lets you control various parameters. See FSync Options for details.
Automatic Execution This will bring up a dialog box to make execution of FSync more automatic or even fully automatic. See Specifying Automatic Options for details.
Edit Extensions to skip
This will allow you to specify certain file extensions that you do not want to synchronize. See Excluding File Extensions for details.
Edit Directoriesto skip
This will allow you to specify certain directories that you do not want to synchronize. See Excluding Directories for details.

Editing the File List

When you ask to edit the file list you are presented with a dialog box that displays all the files in the file list. You can select individual files from this list and then perform one of the following tasks:

Supplying an Alternate Merge Mechanism

When FSync determines that a file needs to be copied from one directory to another, it can do that using built-in operating-system functions. However, if both files have changed, you may want to merge the changes in each file together. In such cases FSync can automatically invoke MergeWin (as an Automation Object). However, you can supply an alternate mechanism to do the merging if you prefer.

Whenever FSync wants to merge two files it displays a dialog box.

If the file is determined to be either a text file or xBASE file, the radio button, "merge the two files using internal merge" (meaning MergeWin) will be set by default. For other types of files, this option is not available.

For any type of file you can select "Merge the two files using external program." You must specify the name of the program to be run. A command line will ge generated of the following form:

command file1 file2

Thus, you must supply a command (program or batch file) to accomplish this function. Your command should merge changes between the two files, and replace both original files with the merged version. (If you have a merge program you want to use but it doesn't have the above-described behavior you can simply "wrap it" in a batch file.)

FSync Options

You can set numerous FSync options by selecting "Options" from the "Sync" menu. You will then see a dialog box such as the following:

General Options (Check boxes)

At the top of the options dialog box are three check boxes that govern the overall synchronization operation. (Note that all options are set and operated on independently for each FSync document.) All of these options are initiazed to "not checked" for new FSync documents.
Include Subdirectories
If this box is checked then scanning and synchronizing will include subdirectories of the specified directories. If this box is not checked then only the specified directories will be scanned and synchronized.
Allow Multiple Output Volumes
If this box is checked, then if files don't fit on the current output disk a new disk will be used. This can be used, for example, to copy files to diskettes, super-floppies, zip drives or Syquest drives. This option was added so that I can use this program as a backup program. It assumes most files will be moved from the first directory to the second. If this box is not checked, then all files from directory one must fit on the drive specified for directory two, or else an error will occur.
Use these settings once, then revert to previous settings
If this box is checked, any other changes you make to the options dialog box will only apply to the next sync operation. Then the program will revert to the previous settings. (If you save the FSync document before doing a sync operation, the previous settings will be saved.) This option is used for cases, where, for example you want to do a single sync, with the option "Make directory 2 look like directory 1" and thereafter do a normal sync operation. If this box is not checked, then any changes you make in the options dialog box will be made permanent when you click "OK".

File Manipulations (Radio buttons)

This section of the options dialog box lets you choose what actions to take to synchronize your files. This section is divided into two parts:
Each of the radio buttons in this section selects a general synchronization strategy:
Synchronize the two directories
This option treats both directories as peers. Files are copied from either directory to the other to make the two directories match. If the file has been changed in both locations, you will be given a chance to merge the contents of the two files.
Make directory 1 look like directory 2
This option treats directory 2 as the "master" or "source" directory, and will attempt to change directory 1 to match.
Make directory 2 look like directory 1
This option treats directory 1 as the "master" or "source" directory, and will attempt to change directory 2 to match.
This option indicates that some non-standard set of detail options is in effect. Normally you would not click on this button. (Doing so does not change any settings.) FSync will automatically set this button when you select a button in the "Details" section.
Any time you select a button in the "summary" section, FSync automatically sets the buttons in the "details" section. Thus, you can select various summary options and then examine the detail settings to understand the effects of the summary option you select.
Selecting buttons in this section lets you choose actions for each particular circumstance that FSync encounters. This section consists of a matrix of radio buttons. All of the buttons in a given row relate to the condition of the files being synced. The columns represent the choices of actions. Once you click on any button in the "details" section, FSync will automatically set the "custom" button in the "summary" section.

Specifying Automatic Options

You can specify options for reducing the amount of user interaction from the "Automatic Execution..." command on the Sync menu. (See
Automatic (Unattended) Operation for more information.)

From here you can specify three types of options.

Message Destinations

You can specify to send messages to dialog boxes or an ASCII log file or both.

If you specify a log file, you can also specify the amount of detail you want written to the file. Error messages are always written. You can optionally also send information messages and/or successful file actions (copy, etc.)

Handling Automatic Termination

When FSync is run with the -a command-line option it will generally terminate automatically when the synchronization action is completed. However if there were errors, you may want to have FSync stop without exiting.


There are a number of situations for which FSync prompts the user for instructions. You can pre-specify these reponses.

Excluding File Extensions

FSync includes the ability to automatically set files with specified extensions to "Skip this file every time."

To examine or modify the list of file extensions to skip, select "Edit file extensions to skip" from the "Sync" menu. You will then see a dialog box like this:

From here you can select and delete extensions. Or you can select the "Add" button which will display the following:

From this latter dialog box you can add a preset category of extensions or individual extensions that you specify.

All extensions on the list that you specify will be set to be skipped from synchronization. The check for these extensions is made when a new file is encountered or (optionally) when you edit the list of extensions. This gives you the ability to then edit the file list and change the status of specific files even if they have an excludible extension.

Excluding Directories

FSync also includes the ability to automatically skip specified directories. Unlike skipping extensions (above) the files are not marked as "skip this file every time". Rather they are simply not

To examine or modify the list of file directories to skip, select "Edit directories to skip" from the "Sync" menu. You will then see a dialog box similar to the "extensions to skip" dialog box shown above.

From here you can select and delete directories. Or you can select the "Add" button which will display a dialog box that lets you specify a new directory to skip. This directory may be entered as a relative directory (relative to the "to" and "from" directories. It may also be entered as an absolute directory, which must specify a directory below either the "to" or "from directory.

Automatic (Unattended) Operation

It is possible to run FSync so that it automatically scans and synchronizes two directories without user intervention.