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.


upload_a_directory.s

Download

This simple script uploads the contents of a directory on your local file system to a managed site.


  1  SET source_folder = "c:\foldertocopy"
  2  SET target_folder = "/foldertocopy"
  3  SET managed_site_name = "myftpsite"   ;; as set up in the Robo-FTP Configurator
  4  
  5  ;; Log on to the site named above
  6  FTPLOGON managed_site_name
  7  IERROR RETURN
  8  
  9  ;; Change to the local folder (to be uploaded)
 10  WORKINGDIR source_folder
 11  IFERROR RETURN
 12  
 13  ;; Create and change to the remote folder (which will contain the contents of the local older)
 14  FTPMAKEDIR target_folder
 15  FTPCD target_folder
 16  IFERROR RETURN
 17  
 18  ;; Copy the entire contents of source_folder to target_folder, including subfolders and nested files
 19  SENDFILE "*" /emptydirs /subdirs

 20  IFERROR RETURN

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