Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFFTP error- what it means?

Status
Not open for further replies.

LongHorn

Programmer
Jun 20, 2001
30
0
0
US
This is the error I received when trying to list the contents of the directory.

550 /*.*: The filename, directory name, or volume label syntax is incorrect.

What does this error mean?

Here is my code (the same as the one in the CF Help References)

<--- open FTP connection --->
<CFFTP CONNECTION=FTP
USERNAME=&quot;anonymous&quot;
PASSWORD=&quot;password&quot;
SERVER=&quot; ACTION=&quot;Open&quot;
STOPONERROR=&quot;Yes&quot;>
<--- change directory name --->
<CFFTP CONNECTION=FTP
ACTION=&quot;ChangeDir&quot;
DIRECTORY=&quot;some_directory&quot;
STOPONERROR=&quot;Yes&quot;>

<--- get current directory name --->
<CFFTP CONNECTION=FTP
ACTION=&quot;GetCurrentDir&quot;
STOPONERROR=&quot;Yes&quot;>

<--- output directory name --->
<CFOUTPUT>
FTP directory listing of #cfftp.returnvalue#.<p>
</CFOUTPUT>

<--- get directory info --->
<CFFTP CONNECTION=FTP
ACTION=&quot;listdir&quot;
DIRECTORY=&quot;/*.*&quot;
NAME=&quot;q&quot;
STOPONERROR=&quot;Yes&quot;>

<--- output dirlist results --->
<HR>
<P>FTP Directory Listing:</P>

<CFTABLE QUERY=&quot;q&quot; HTMLTABLE>
<CFCOL HEADER=&quot;<B>Name</B>&quot; TEXT=&quot;#name#&quot;>
<CFCOL HEADER=&quot;<B>Path</B>&quot; TEXT=&quot;#path#&quot;>
<CFCOL HEADER=&quot;<B>URL</B>&quot; TEXT=&quot;#url#&quot;>
<CFCOL HEADER=&quot;<B>Length</B>&quot; TEXT=&quot;#length#&quot;>
<CFCOL HEADER=&quot;<B>LastModified</B>&quot;
TEXT=&quot;Date(Format#lastmodified#)&quot;>
<CFCOL HEADER=&quot;<B>IsDirectory</B>&quot;
TEXT=&quot;#isdirectory#&quot;>
</CFTABLE>



thanks,
Longhorn
 
Hi,

In

<--- get directory info --->
<CFFTP CONNECTION=FTP
ACTION=&quot;listdir&quot;
DIRECTORY=&quot;/*.*&quot;
NAME=&quot;q&quot;
STOPONERROR=&quot;Yes&quot;>

I think you actually need the directory to be a directory name so it should probably be :

<--- get directory info --->
<CFFTP CONNECTION=FTP
ACTION=&quot;listdir&quot;
DIRECTORY=&quot;#cfftp.returnvalue#&quot;
NAME=&quot;q&quot;
STOPONERROR=&quot;Yes&quot;>
Or whatever directory name you have got.
If you wish to get the ftp listing for all subdirectories it is a little more difficult. You will have to recurse through each directory to get the information.
So if you create a blank array and then List the directory being pointed to, and add its directories to the array. Do this until the last directory has been added and then output the array.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top