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.
The "gks.exe"
application has 3 parameters:
Example:
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.
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.
There are only 3 possible reasons why a file is copied from the source to the destination:
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:
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.