At 12:07 PM 3/3/98 +0000, Claire McNab wrote:
First invocation: just get directory listing
Then build script. Files are compared by time and size: newer local
files are always uploaded. Other files are compared by size:
different sizes cause a file to go into the update queue, and ASCII
conversion issues are handled by speccing which extensions are to be
treated as ASCII -- local files in that category are scanned to
calculate an ASCII size before comparison with remote size.
Finally, it generates an upload script, with a cmd line flag to
enable deletion of redundant remote files. The first and last tasks
in each script are retrieving a remote dir listing, so it is
self-correcting, though with some potential for lag (discussed in the
docs).
Claire,
That's a good design. A Win32 implementation in Perl would take under a
hundred lines. There are excellent FTP client facilities in the
Win32::Internet module, including the auto-extraction of dates from FTP
directory listings.
There's not much of a Win32 audience for this since the nontechies would
never have Perl installed. (They wouldn't have KA9Q installed either :^) )
They'd use the facilities in programs like shareware FTP Voyager that can
synchronize directory trees over FTP, or their HTML authoring packaes like
FrontPage would hide the synchronization problem entirely.
-- thanks, SP