How to Use the Script Wizard to Generate Script with Sysax FTP Automation (part 1)

March 9th, 2014 by Rossy Guide

Instructions how to download a file or folder

The ftpdownload command can be used to download either an individual file or an entire folder tree. The files and folders are downloaded to the current local working path that was set using the ftpsetpath command.

 

o Setting remote path:

The ftpsetpath command is used to set the current working path for the remote system. The predefined keyword remote is used to specify either the remote system. The path string contains the new path to be set. The ftpresult predefined status flag is set to the predefined constant success if the command completed successfully.

 

Syntax for setting remote path


ftpsetpath <keywords: remote>, <path string>;

 

Example of using the command for setting paths


ftpsetpath remote, "/home/ftpin"; "set the current remote working path

 

The predefined keywords file and folder are used to specify either a file or a folder. An optional local name string can be provided to save the downloaded item to a new name. If a wildcard name pattern is specified, all items matching that pattern are downloaded. If a new name is also provided, it is used for saving the first matching item. The ftpresult predefined status flag is set to the predefined constant success if the command completed successfully.

 

Syntax for downloading files and folders


ftpdownload <keywords: file, folder>, <remote name string>
[, optional: <local name string>];

 

Examples of downloading files and folders


ftpdownload file, "text.dat"; #download file

ftpdownload file, "*.doc"; #download all files in
the current folder matching the pattern *.doc

ftpdownload file, "text.dat", "text_0503.dat";
#download file and save as text_0503.dat

ftpdownload folder, "www"; #download entire folder tree

 

Comments are closed.