About SyncDiscs


Disclaimer

David Pilling accepts no responsibility for any loss of data which occurs as a result of using this program, whether as a result of correct or incorrect operation. You use SyncDiscs at your own risk.

This program makes the contents of two discs or directories the same. I wrote it to allow me to keep an exact copy of my hard disc on a removable disc. It could also be used for synchronising a portable computers disc with that on a main machine.

Running the program will open a window

SyncDiscs

The top three writable text icons can have directories dropped into them.

If Shift is held down the directory name will be appended to the current contents of the icon, with a bar in between.

If Control is held down the directory leaf will have one element removed - this is useful if you want to enter the root directory of a disc.

Instead of dragging and droping a directory, you can click on the buttons at the end of the text icons and open a standard browse for directory window.

The first icon is 'Primary' this is the main directory, the one that you want to make the secondary directory like. The Primary directory is usually not changed.

The second icon is 'Secondary' this is the directory which is to be changed.

The third icon is 'Scrap' - any files which have to be removed from the Secondary directory are moved here. If the scrap directory is left blank, then the files will be deleted.

All three icons can have more than one directory name in, separated by bars. This allows one run of the program to synchronise a number of directories. One directory will be taken from each of the three icons in turn. SyncDiscs will warn you if there are not the same number of directory names in all of them.

A number of options are provided. These allow any newer files which are found on the secondary to be copied back to the primary. Another option allows extra files on the secondary to be copied back to the primary. Alternatively you can choose to have any newer files on the secondary overwritten by the corresponding (older) file on the primary.

Finally a log file can be created showing what has gone on.

The contents of the window are retained - allowing the same operation to be easily repeated.

Clicking on Start will commence the synchronisation operation.

Clicking on the Compare button will make the program do a comparison of the primary and secondary, no changes will be made to anything on disc. When the comparison is finished a .txt file containing the results is opened.

It is possible to call SyncDiscs with some command line arguments. You'd do this if you wanted to automate the backup procedure. For example SyncDiscs can be run using the Scheduled Tasks facility available in My Computer.

The arguments are;

-quit Makes the program execute and then quit
-primary <path> Set the primary path
-secondary <path> Set the secondary path
-scrap <path> Set the scrap path
~scrap No scrap path
-log <file> Set the log file name
~log No logging
-newer Copy newer files from secondary to primary
~newer Don't copy newer files from secondary to primary
-extra Copy extra files from secondary to primary
~extra Delete extra files on secondary
-overwrite Overwrite newer files on secondary
~overwrite Leave newer files on secondary
-timeres <time> Set the resolution used for comparing file times in centiseconds

Missing command line arguments default to the configured values. For example if no -log argument is provided, the value entered in the window is used.

If you want to use command line parameters when running SyncDiscs as a Scheduled Task, select the open advanced properties option when creating the task. Parameters can then be added after the program path in the "Run" writable icon. The Run icon can also be accessed by right clicking the task in Scheduled Tasks window and clicking on "Properties".

Unexpected results can arise when synchronising files on different filing systems because they store file times with different resolutions. So for example if you synchronise a directory on NTFS with one on FAT, you may find that a subsequent synchronisation (without any changes to the files) would copy files back from FAT to NTFS - assuming the "Copy newer files from secondary to primary" option was selected.

One fix for this behaviour is provided by a registry variable

HKEY_CURRENT_USER\Software\DavidPilling\SyncDiscs\SyncDiscs\TimeRes

This is the time resolution used in centiseconds (hundredths of a second). If two file times are within the time resolution they are treated as being the same.