I want to write a linux shellscript that checks a specific folder on a specific FTP-server whether there are new files or not. If there are new files I want to download them to a local directory (to gain access for an local application to these files). The problem is that the files I suggest to find on that FTP are too big for downloading and comparing them with local files.
Do you have an idea how I can check via a ftp-connection whether there are new files or not? How can I check and compare those files?
BTW:
I use "ftp" with a self-produced .ftp-file which i use as inputfile that gives the commands to the ftp prrogram. The rest of the script is finished but the check-action is missing...
After each download I have to put a flag-file for the download to the server (e.g. if I download "xyz-2008-10-12.csv" I have to upload a file called "xyz-2008-10-12.csv.ok" with the size of 0 kb)
(- There is a script running on the ftp-server that moves all files which have a .ok-flagfile to an archive folder)
How can I get a list of the filenames on ftp the easiest way, to touch the new 0 kb-ok-files?