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.


download_newest.s

Download

This simple script downloads the newest file on the remote server.

The following command line syntax may be used to launch Robo-FTP and automatically execute this script:

robo-ftp.exe -s"download_newest.s"

You can also add the -v option to the command line to hide the Robo-FTP window.


  1  ;; Specify the download destination folder.  
  2  ;; This can be a  network share if Robo-FTP is launched 
  3  ;; by a user account with network access. 
  4  WORKINGDIR "c:\download\destination\folder"
  5  
  6  ;; Connect to remote site and change into a subfolder. 
  7  FTPLOGON "MyRemoteSite"
  8  IFERROR RETURN
  9  FTPCD "/reports"
 10  IFERROR RETURN
 11  ;; Find name of the newest file and then download it.
 12  GETSITEFILE "*" /newest 
 13  IFERROR RETURN
 14  RCVFILE %sitefile 

Browse complete list of scripts