• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF10 CFFTP listDir

New Here ,
May 16, 2013 May 16, 2013

Copy link to clipboard

Copied

Can someone please help. I'm trying to do a simple list of directory and the command doesn't work.         

  <cfftp
     action="listdir"

     server="<a href="ftp://ftp.boongroup.com">~~~~~.com</a>"
     username="~~"<br>     password="~~~"
     name="test"
     directory="out"
     >

<cfdump var="#test#">  the command works fine in CF8 and CF9. But in CF10 it returns

h1. An error occurred during the FTP listdir operation.


Error: 215 . .

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

You first have to open the connection. After the listDir action, you have to close the connection. Follow the fully worked-out example in the ColdFusion livedocs on CFFTP with listDir action.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

doesn't make a difference. Same error. I can getfile and putfile just fine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

Does the folder that you're trying to list give READ permission to the FTP account that's trying to read it?

Just throwin' stuff out there.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

permissions are good, running the command in CF8 to this exact folder

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

I would also throw the following in, as a long shot. FTP error 215 says something about system name. So, what about changing your name attribute from test  to, say, myTest ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

I had that thought as well. I tried different names with the same result, i think the error is a false positive

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 17, 2013 May 17, 2013

Copy link to clipboard

Copied

The "NAME" that the error 215 is referring to is the server name at the other end.  The "Name" in CFFTP is your query name.

At this point I would run FileZilla with full tracing/logging turned on, and see if anything funky happens when you connect to the ftp server.  It will do a listdir automatically when it connects.  Look to see if the server changes its name or something like that.  The ftp support in CF10 is almost certainly different from that in CF8 or CF9, so maybe there is something that it is sensitive to.

Wishing this advice wasn't so vague, but at this point it looks like you need more information about the connection that what CF is going to give you.  Keep us posted.

reed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 06, 2013 Jun 06, 2013

Copy link to clipboard

Copied

Any word on this?  I'm having the same problem.  I can connect to a filezilla server and see that both coldfusion and ftp from a command prompt will translate the listdir and dir commands as a LIST action in filezilla.  I don't have access to the ftp server that's giving me this 215 error code unfortunately, maybe something interesting would be found in those logs.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 07, 2013 Jun 07, 2013

Copy link to clipboard

Copied

I had to do a workaround, using cfexecute to call a local windows batch file to just get * and put them in a folder and have cfdirectory review.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 31, 2013 Dec 31, 2013

Copy link to clipboard

Copied

Adobe - you seem to have a problem here. I have tried ListDir on known connections and it fails every time. Can somebody provide an answer?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 31, 2013 Dec 31, 2013

Copy link to clipboard

Copied

Action="close" does not work either. It says "invalid Connection Specified" even if this command is issued immediately after the Open command which works fine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 08, 2014 Jan 08, 2014

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 08, 2014 Jan 08, 2014

Copy link to clipboard

Copied

Will do. However we installed CF 9 and it worked on first try. We had

been trying for a week with CF10

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 30, 2014 Jul 30, 2014

Copy link to clipboard

Copied

LATEST

See this bug report I created Bug#3796626 - CFFTP LISTDIR Command Fails

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation