User Guide

138 Chapter 2: ColdFusion Tags
cfftp: Opening and closing FTP server connections
Description
To establish a connection with an FTP server, you use the open action with a connection
attribute.
Syntax
<cfftp
action = "action"
username = "name"
password = "password"
server = "server"
timeout = "timeout in seconds"
port = "port"
connection = "name"
proxyServer = "proxy server"
retryCount = "number"
stopOnError = "Yes" or "No"
passive = "Yes" or "No">
See also
cfhttp, cfldap, cfmail, cfpop
Attributes
Attribute Req/Opt Default Description
action Required FTP operation to perform.
open: create an FTP connection
close: terminate an FTP connection
username Required if
action =
"open"
User name to pass in the FTP operation.
password Required if
action =
"open"
Password to log in the user.
server Required if
action =
"open"
FTP server to which to connect; for example,
ftp.myserver.com
timeout Optional 30 Value in seconds for the timeout of all operations, including
individual data request operations.
port Optional 21 Remote port to which to connect.
connection Optional, but
always used
with
open or
close
Name of the FTP connection. If you specify the username,
password, and server attributes, and if no connection exists
for them, ColdFusion creates one. Calls to
cfftp with the
same connection name reuse the connection.
proxyServer Optional String. Name of proxy server (or servers) to use, if proxy
access is specified.
retryCount Optional 1 Number of retries until failure is reported.