Establishing a Connection with CFFTP

Use the CONNECTION attribute of the CFFTP tag to establish a connection with an FTP server.

If you use connection caching to an already active FTP connection, you don't need to respecify the connection attributes:

<CFFTP ACTION="action"
    USERNAME="name"
    PASSWORD="password"
    SERVER="server"
    TIMEOUT="timeout in seconds"
    PORT="port"
    CONNECTION="name"
    PROXYSERVER="proxyserver"
    RETRYCOUNT="number"
    STOPONERROR="Yes" or "No"
    PASSIVE="Yes" or "No">

ACTION

Required. Determines the FTP operation to perform. To create an FTP connection, use Open. To terminate an FTP connection, use Close. See Connection Caching for more information.

USERNAME

Required for Open. User name to pass in the FTP operation.

PASSWORD

Required for Open. Password to log in the user.

SERVER

Required for Open. The FTP server to connect to, as in ftp.myserver.com

TIMEOUT

Optional. Value in seconds for the timeout of all operations, including individual data request operations. Defaults to 30 seconds.

PORT

Optional. The remote port to connect to. Defaults to 21 for FTP.

CONNECTION

Optional. The name of the FTP connection. Used to cache a new FTP connection or to reuse an existing connection. If the USERNAME, PASSWORD, and SERVER attributes are specified, a new connection is created if no connection exists for the specified user. All calls to CFFTP with the same connection name will reuse the same FTP connection information.

PROXYSERVER

Optional. A string that contains the name of the proxy server (or servers) to use if proxy access was specified.

RETRYCOUNT

Optional. Number of retries until failure is reported. Default is one (1).

STOPONERROR

Optional. Yes or No. When Yes, halts all processing and displays an appropriate error. Default is Yes.

When No, three variables are populated:

PASSIVE

Optional. Yes or No. Defaults to No. Indicates whether to enable passive mode.