Gorman Kiln Sync  v1.0.0-2752
Usage

Description

GKS is a command-line application to recursively sync files between two directories or drives. There is no user interface, and other than the required parameters, there is no configuration required.

The sync is unidirectional. Files and folders are copied from a source location to a destination, but not back. Any changes made to files in the source directory, or new files created in the source directory, will be immediately copied to the destination folder.

Warning
Changes made to files in the destination folder will be immediately overwritten if a file by the same name exists in the source folder.

Parameters

The "gks.exe" application has 3 parameters:

  • source directory
  • destination directory
  • flag indicating whether files should be renamed

Example:

gks_running.png

The source and destination directories should be obvious. Files are copied from the source to the destination. The source directory must exist, and the destination directory will be created if it doesn't already exist.

The 3rd parameter determines if files are renamed. When set to "true" or "TRUE", files will be renamed if they match a certain pattern. The pattern is:

  • "#_##+.ndx" (case insensitive when it comes to the extension, so it matches NDX, nDx, etc.)

Files that match this pattern will be renamed so the first digit is dropped, and all other digits are shifted one position to the left. For example:

source filename destination filename
3_4567.ndx 4_567.ndx
4_1789.ndx 1_789.ndx

When this 3rd flag is set to "false", files will still be copied but wont be renamed.

Output

The console output is simple. A timer displays how long the application has been running, and a list of files that have been copied is displayed along with the reason why the file was copied.

gks_window.png

There are only 3 possible reasons why a file is copied from the source to the destination:

  • a new file has been created
  • the timestamp of the source and destination files do not match
  • the size of the source and destination files do not match

Minimized windows

When minimized, the GKS application will hide the terminal window so it doesn't needlessly take up room on the task bar. This also prevents users from accidentally closing the application.

This minimize/hide behaviour can also be utilized if starting GKS from a startup script or batch file. For example, a script may contain the following:

start "GKS" /min c:\progra~1\gks\bin\gks.exe c:\22m2k\data z:\data\ true

When started this way, the minimized window will be hidden within a few seconds.

The only way to kill GKS once it has been hidden from view is to use the Windows Task Manager.