home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / cfftp.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.2 KB  |  51 lines

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