home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Documentation / snippets / cfftp.cfm < prev    next >
Encoding:
Text File  |  1999-04-12  |  1.2 KB  |  53 lines

  1. <!--- This view-only example shows the use of CFFTP --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>CFFTP Example</TITLE>
  5. </HEAD>
  6.  
  7. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  8. <BODY  bgcolor="#FFFFD5">
  9.  
  10. <H3>CFFTP Example</H3>
  11. <P>CFFTP allows users to implement File Transfer Protocol
  12. operations.  By default, CFFTP caches an open connection to
  13. an FTP server.
  14.  
  15. <P>CFFTP operations are usually of two types:
  16. <UL>
  17.     <LI>Establishing a connection
  18.     <LI>Performing file and directory operations
  19. </UL>
  20. <P>This view-only example opens and verifies a connection,
  21. lists the files in a directory, and closes the connection.
  22.  
  23. <!---
  24. <P>Open a connection
  25.  
  26. <CFFTP ACTION="open"
  27. USERNAME="anonymous"
  28. CONNECTION="My_query"
  29. PASSWORD="youremail@email.net"
  30. SERVER="ftp.tucows.com"
  31. STOPONERROR="Yes">
  32.  
  33. <P>Did it succeed? <CFOUTPUT>#CFFTP.Succeeded#</CFOUTPUT>
  34. <P>List the files in a directory:
  35. <CFFTP ACTION="LISTDIR"
  36.        STOPONERROR="Yes"
  37.        NAME="ListFiles"
  38.        DIRECTORY="lib"
  39.        CONNECTION="my_query">
  40. <CFOUTPUT query="ListFiles">
  41.     #name#<BR>
  42. </CFOUTPUT>
  43.  
  44. <P>Close the connection:
  45. <CFFTP ACTION="close"
  46. CONNECTION="My_query"
  47. STOPONERROR="Yes">
  48.  
  49. <P>Did it succeed? <CFOUTPUT>#CFFTP.Succeeded#</CFOUTPUT>
  50. --->
  51. </BODY>
  52. </HTML>       
  53.