* Set some variables that we will use later SET from = "Robo-FTP Script Runner" SET from_email = "myaddress@mycompany.com" SET subj = "Automatic download failure" SET body = "Today's download failed. Please contact support." SET server = "smtp.mail.server" SET to = "Ray Johnson" SET to_email = "rjj@laugh-in.com" FTPLOGON "mysite" LOOPCOUNT 3 :many_tries RCVFILE "mydownload.txt" /resumeany LOOPIF goto many_tries else goto downloaded * Failure * If you get to this point, it means that the * script has tried to download the file three * times and still can't complete the download CREATEMAIL from from_email subj body "" SENDMAIL server to to_email /user=smtpid /pw=smtppw goto done :downloaded * Success! * Additional processing goes here :done ftplogoff exit