I have written a basic fetching script. The script logs into an FTP site, downloads a .zip file, then unzips and moves the files to the necessary folders, then deletes them, etc.
The problem I have is if one of the files no longer exists on the FTP site or another part of the script fails, then the script can hang or just quits.
How can I incorporate some basic error-checking (that maybe outputs to a log file?) and then continues on with the script at different stages? Does anyone have any suggestions on what to start with?
Thanks for that! What's the difference between running scp in a script and ftp? I will probably use ncftp after looking into it. So outside of that, how can I base my script on unzipping files that may or may not be there?...and if so, move them?