SyncFile
SyncFile is a bi-directional update or "syncronization" program.
In it's simplest form, it compares the timestamps of two files of the
same name, and if they are different, syncronizes the two by copying
the newer one on top of the older. Filename paterns can be specified,
and there are options that support directory walking, actions to take
when directories or files on one side don't exist on the other, and so
on.
In many ways, it's a rough command-line equivalent to the Windows
briefcase. In fact, it was written to overcome some of the shortcomings
of earlier versions of briefcase.
Usage
syncfile [-ehmnoqrstvw] [-f file] dir1 dir2 [files...]
where:
- dir1 and dir2: the two directories containing files
to syncronize.
- files: filenames or wildcard pattern of filenames to be
syncronized. Optional. [Default: *.*]
- -d: debug. Spits out more progress and file comparison
information as it does its work. [Default: off]
- -e: sync only files that already exist in both places.
Normally if a file is missing on one side of the comparison, syncfile
will treat it as out of date and copy over the file found on the other
side. This option causes that file to simply be skipped instead.
[Default: off]
- -f cfile: read from command file. See below.
- -h: help: print summary help text and exit.
- -n: don't create dirs that don't exist in both places.
Normally if a directory is found on one side of the comparison but not
on the other, then syncfile will create the missing directory. This
option causes the missing directory tree to simply be skipped.
[Default: off]
- -o: one-way update files in dir1 to dir2. Updates occur in
one direction only when this option is specified. [Default: off]
- -q: quiet. Don't complain about non-existant directories.
Syncfile will normally warn if a directory doesn't exist on one side of
the comparison. This option turns off that warning. [Default:
off]
- -r: recurse subdirectories. When specified, after
syncronizing the files in the two directories specified on the command
line, syncfile recurses into each subdirectory on both sides of the
comparison and continues it's work. This allows entire directory trees
to be syncronized. [Default: off]
- -s: sloppy time compares. Allow ~3 second diff as equal.
Different filesystems retain different level's of granularity for the
timestamps of files. Specifically FAT filesystems timestamps are
accurate only to roughly 1/18th of a second. This can cause problems
when compare to the same file on another filesystem such as NTFS, which
has better resolution. Files which are actually "in sync" could appear
to have slightly different timestamps. This option allows a difference
of up to 3 seconds to be considered as being in sync. Use with caution.
[Default: off]
- -S: really sloppy time compares. Allow around a 60
second difference as equal. Emperically, some comparisons seemed to
require truly excessive lattitude in timestamps comparisons. Use this
option with extreme caution. [Default: off]
- -t: tell mode. Copy nothing, but show what actions would be
performed. [Default: off]
- -v: verbose: output more progress information. [Default:
off]
- -w: show full (wide) filenames. Syncfile normally truncates
all filenames to fit in a window assumed to be 80 characters wide.
[Default: off]
- -x: force update of read-only files. Syncfile will not
normally overwrite files which are marked read-only. Setting this
option will allow syncfile to overwrite read-only files. The read-only
setting on the file is retained. [Default: off]
Quirk: if files is a restrictive pattern, it applies to
directories recursed into as well as files synced.
Command File Input
If -f is specified, dir1, dir2 and files are ignored, and commands
are read from cfile. Commands are of the format:
switches dir1 dir2 files...
where switches begin in column 1, and include any of the applicable
command line switches. Space is required if no switches are specified.
Switches are returned to values as specified on command line before
executing each line.
Requirements
Windows 2000 or Windows XP, x86 versions.
Download
Syncfile is freeware. Unfortunately because of today's litigious society,
I also have to tell you the following:
By downloading syncfile you agree to assume all risk for its
use. It may or may not meet your needs. It's extremely unlikely, but
syncfile might have bugs that could harm or delete files on your
computer. Perhaps all of them. Puget Sound Software assumes no
liability for any damage caused by your use of syncfile in any way.
If you can't accept those terms, then don't download syncfile.
With that out of the way, I will also say that if you find a bug in
syncfile I'll attempt to correct the problem and get you a new version
for free. Since syncfile is freeware that last part is kinda silly, but
it's my policy for all the software I'm providing here, free or not.
Download Syncfile here. (ZIP, 25,177 bytes).