cfftp example
Here is an Example to show the usage of cfftp.
cfftp lets users implement File Transfer Protocol operations. By default, cfftp caches an open connection to an FTP server. cfftp operations are usually of two types: 1. Establishing a connection 2. Performing file and directory operations
This example opens and verifies a connection, lists the files in a directory, and closes the connection.
<cfftp action = "open"
username = "user1"
connection = "myconn"
password = "mypwd"
server = "10.192.36.229"
stopOnError = "Yes">
<!--- Did the connection succeed... --->
<cfoutput>#cfftp.succeeded#</cfoutput>
<!--- List the files in a directory... --->
<cfftp action = "LISTDIR"
stopOnError = "Yes"
name = "ListFiles"
directory = "/"
connection = "myconn">
<cfoutput query = "ListFiles">
#name#<br>
</cfoutput>
<!--- Close a connection --->
<cfftp action = "close"
connection = "myconn"
stopOnError = "Yes">
<!--- Did the close succeed... --->
<cfoutput>#cfftp.succeeded#</cfoutput>
You can download the example code using the download link.

There are no comments for this entry.
[Add Comment]