FTP: using MGET with DELE



I am trying to set up a batch file for a client to download files from a
remote FTP server a couple times per day.

Files are posted into our directory on the server periodically throughout
the day, I believe once every hour.

I would also like to "clean up after" our downloads by deleting files which
were downloaded.

Right now I am using simply:

....
MGET *.txt
DELE *.txt
....

But I am worried that a file will be posted in the time between initiation
of MGET and initiation of DELE, and then will be deleted without having been
downloaded.

This would be a rare situation probably, but I want this to be foolproof.

Besides telling the users to not run the script during the first 15 minutes
past the hour, is there some more elegant way to achieve this? (i.e.
something that involves no dependency on the user to make the right
decision!)

Thanks!

TRS


.