1826061 Members
4180 Online
109690 Solutions
New Discussion

Automate FTP

 
SOLVED
Go to solution
A. Clay Stephenson
Acclaimed Contributor

Re: Automate FTP

Amazingly Sally, my script already does the email too along with that pesky error checking. You are doing error checking aren't you? In any event, you should be able to see the code in that part of the shell script that calls mailx and adapt it to your uses.
If it ain't broke, I can fix that.
Coolmar
Esteemed Contributor

Re: Automate FTP

Thanks Clay....actually that is exactly what I did. However, before running the script I did a few tests and then checked the error status and they were all "0". I only want an email if something is downloaded. It seems to errorcheck on the ftp session itself, not what happened inside the ftp session.
Coolmar
Esteemed Contributor

Re: Automate FTP

Well, I got it working. I do a count of the number of files in the directory before I run the script, and then right after....if they don't match, then there is an extra file and that would be the new one which was downloaded. Then I am emailed. Couldn't think of another way.

Thanks for all the help everyone.