FTPDownload Action

Retrieve a file from the FTP server to the local computer.

Parameters

Connection – (Required)

Name of the connection that the action will be applied to. Should be the same name as specified in the 'FTPConnect' call.

Name – (Required)

Name of the file to be retrieved from the FTP server.

Folder – (Required)

Folder to retrieve file from. This folder name is relative to the 'Current folder location'

Wait – (Required)

Specifies whether the execution of the action should wait for the download to complete (synchronous) or start the download without waiting (asynchronous). This parameter should be set to one of the pre-defined Wait constants.

File Already Exists – (Required)

Action to take if the file being downloaded already exists in the directory specified by the 'Folder' parameter. This parameter should be set to one of the pre-defined File Exists constants.

Examples

The following example creates an FTP connection to the IBMi, downloads the STATES.mbr file and places it into your local C:\Temp folder. The example assumes that there is a previously defined ftp connection 'iSeriesFTP'.

FTPConnect (testConnection, Connection=iSeriesFTP;)

FTPDownload (testConnection, STATES.MBR, /QSYS.LIB/DDM.LIB/STATES.FILE, FTPDownloadWait, FTPDownloadAbort)

FTPDisconnect (testConnection)

See Also

FTPConnect Action | FTPDisconnect Action | FTPUpload Action | FTPChangeFolder Action | FTPDelete Action | FTPNewFolder Action | FTPQuote Action | FTPRename Action