Call now to talk to an automation expert — (512) 345-2211

Script Library

Sample scripts are provided as-is with no warranty of fitness for a particular purpose. These scripts are solely intended to demonstrate techniques for accomplishing common tasks. Additional script logic and error-handling may need to be added to achieve the desired results in your specific environment.


resume_download

Download

Robo-FTP supports resuming downloads with servers that also support this feature (most do these days).

This means that if you get half-way through a large download and your internet connection drops, you can resume the download at whatever point you lost your connection instead of starting over from the beginning.

This sample demonstrates how to use the resume feature along with sending email notifications.

The script logs on and tries to download a file. If the download fails, it re-tries it however many times the retry count is set to in the site definition for "mysite".

It uses the /resume option which tells Robo-FTP to resume the broken download if a partial copy of the file exists locally and the server supports resuming the download. Otherwise, it tries to download the complete file.

If it still is unable to finish downloading the file after retrying, it sends a notification email.


  1  FTPLOGON "mysite"
  2  RCVFILE "mydownload.txt" /resume 
  3  IFERROR= $ERROR_SUCCESS RETURN
  4  
  5  * Failure
  6  * If you get to this point, it means that the
  7  * script has tried to download the file three
  8  * times and still can't complete the download
  9  EMAIL "Today's download failed.  Please contact support." /subject="Automatic download failure"

Browse complete list of scripts

Need help figuring out where to start?

Our sales staff is available to answer product questions and help you determine if Robo-FTP is a good match for your project.

Call Now: (512) 345-2211