[plug] ftp scripting?

Brad Hill brad at marketcast.com.au
Wed May 21 16:00:12 WST 2003


Can anyone think of a nice easy way to download files that are sequentially
numbered and only get those that you haven't already got?

As an added complication, i'll be processing the files as they get
downloaded and removing them from the download folder so i can't just do a
simple wget --no-clobber... have to keep track of the number it's up to
somehow.

The files are basically 00000000.txt through to 99999999.txt (i'm guessing
they'll loop back around to 0 once they get too high)

Also i really should allow for if a file gets skipped on the server (ie 45
isn't there but 46 is), or if those skipped files appear at a later date
(ie, i've retreaved up to number 50, but 45 now becomes available).

As an added confusion, i don't really want partially downloaded files
appearing in my download directory, or at least if they are partially
downloaded, lock them in some way so my processing programm can't get at
them untill they're unlocked.

This started out as being quite a simple one line wget command, but with all
the added complexity it's gotten beyond my reach now i think.

Any suggestions much appreaciated.



More information about the plug mailing list