FTPConnect Action

Connects to an FTP Server and performs login.

Parameters

Connection – (Required)

A name that is assigned by the user to the ftp connection. The connection will be referred to by this name in all subsequent ftp actions. For example, your connection name might be something like AcmeFTPserver.

Connection String – (Optional)

A string specifying the FTP connection details. This parameter consists of a semi-colon separated name/value pair that can be set to one of two things:

  1. An existing ftp connection definition (that has been specified in Connections), OR
  2. A full connection definition specifying the ftp server and all relevant connection properties.

Each name/pair value is formatted as so: 'name=value'. For example: Address=192.168.1.1;Port=4245

If this parameter is left blank the FTPConnect action will attempt to use the connection settings from an existing Display\Print Session.

Clicking the prompt button will open the Connection Properties window. This tool will automatically create a correctly formatted name/pair connection string, based on the values entered.

Use defined connection - select this option to specify a pre-established ftp connection definition from the drop down list. Refer to Connections for help on how to create an ftp connection using the Connection Editor. Once the connection is selected you click OK and exit this window.

Specify connection options - select this option if you would like to define the connection manually.

Example

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

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


© 2004-2021 looksoftware. All rights reserved.