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.


monitor_remote_continuous.s

Download

In addition to providing options for scheduling jobs to run at certain times of day, the Robo-FTP Scheduler also offers the option to schedule a job to run "continuously." This gives you an easy way to have an automated process run constantly as a service in the background.

This sample script monitors a remote directory for files to appear. As soon as a file appears in the remote folder, Robo-FTP downloads the file, deletes it from the server, then exits.

Simply schedule this script to run "continuously" and it will go back to waiting for the next file to appear immediately after it successfully downloads the current file.

See the Help file for more details on the scheduling jobs with Robo-FTP:

Scheduling Scripts from the Built-in Scheduler

Note that this script lacks error-handling for simplicity, but before deploying any script in production you should add error handling. See the Help file for details.


  1  FTPLOGON "mysite"
  2  FTPGETFILE "*" /timeout=0
  3  RCVFILE %sitefile /delete

  4  EXIT

Browse complete list of scripts