|
You can use expect and send commands to script an interaction with your ftp client (assuming it's commandline).
Using these commands, open your ftp session, find the correct directory, then run a listing sorted by date.
Use your script to get the last (or first) line of this output and then use it to issue an ftp get for that file.
Alternativly, perl's ftp module is pretty good, you can use that to obtain an array sorted by date of the files in a given directory, then grab the appropriate entry and send the get requiest via perl too.
|