Getting a list of files on an ftp, via shell script...

G'day,

I was wanting to write a shell script that checks an ftp server for the presence of new files, then get those files. In so much as the get, this is pretty straight forward, but I cannot work out how to get a list of files to check. Is it possible for a shell script to get the output of a dir (or similar) command in an ftp session?

This is answered many of times... why don't you search the forum for "ftp script". You might need 2 different ftp sessions -- one to get the list of files, do some shell processing, and then the second to get the files you need. Or you might need to use perl's Net::FTP package.