FTP Sync

Giganews Newsgroups
Subject: FTP Sync
Posted by:  Michael J. Leaver (spam@mjleaver.com)
Date: Mon, 05 Jan 2004

I'm modifying an existing program so that it can sync files to/from and
between FTP servers (using Indy 9). I've read up about the SIZE and MDTM
commands, and if an FTP server supports them then I guess it will be
fairly straight forward to check if a file has been changed (based on
either file size or modified date & time change).

But what about servers that don't support those commands? Luckily (for
testing) my web hoster's FTP server does not. I'm sure other people have
solved this problem before (e.g. MS FrontPage has no problem copying
modified files to the FTP server), so how do you do it? The only way I
can think of is to save what information you can about each file from
the FTP server and then re-compare when you next connect. But this has
problems, i.e. the file size may be rounded to nearest block size, and
the mod date & time may not actually include the time.

Ideas?

Thanks

Replies