Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: CF10 CFFTP listDir

$
0
0

If you can access your ftp server via any ftp client like Filezilla then you will be able to list directories via ColdFusion as well. Share the stack trace as well.

 

Sample Code

 

<cfftp 

     port="21"

    action = "open"

    username = "username"

    connection = "ftp"

    password = "password"

    server = "abc.xyz.com"

    stopOnError = "Yes">

 

<!--- Confirmation of Open --->   

   

<cfoutput> Connection Open :#cfftp.succeeded# </cfoutput>

   

   

<p>List the files in a directory:

 

<cfftp

action = "LISTDIR"

    stopOnError = "Yes"

    name = "ListFiles"

    directory = "/"

    connection = "ftp">

 

    <cfdump var="#ListFiles#">

   

<cfftp

 

action="close"

connection="ftp"

stopOnError = "Yes">

       

        <!--- Confirmation of Close --->   

       

<cfoutput> Connection Closed :#cfftp.succeeded# </cfoutput>

 

HTH

 

Thanks

VJ


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>