Here's an interesting issue... The CFFTP action LISTDIR incorrectly reports the results when




  1. a file with a space in the name exists in the FTP directory, and

  2. a sub directory exists having the first letter lower (say 'a') than the first letter of the file name (say 'f').


The problem occurs in CFMX 6.1 and CFMX 6.1 Updater 1 when connecting to a FTP server using DOS style directory listing. The problem does not occur when connecting to FTP using Unix style directory listing, and nor does it occur when the first letter of the directory (say 'z') is greater than the first letter of the filename.



Sample Code
[cfftp action="open"
username="anonymous"
password="testing"
server=ftp.company.com
connection="conn">
[cfftp
action="LISTDIR"
directory="/test/a/"
name="dirList1"
stoponerror="Yes"
connection="conn" >
[cfoutput query="dirList1">[#name#]
[/cfoutput>

[cfftp
action="LISTDIR"
directory="/test/b/"
name="dirList2"
stoponerror="Yes"
connection="conn" >
[cfoutput query="dirList2">[#name#]
[/cfoutput>

[cfftp passive="yes" connection="conn" action="close">


Actual CF Output:
---------------------
[ar.txt]

[foo bar.txt]
[zDir]


Actual Directory Contents
-------------------------
150 Opening ASCII mode data connection for /bin/ls.
09-17-04 03:53PM

aDir
09-17-04 03:54PM 0 foo bar.txt

150 Opening ASCII mode data connection for /bin/ls.
09-17-04 03:54PM 0 foo bar.txt
09-17-04 03:54PM zDir

FTP Data from TCP Stream in FTP Dialogue
--------------------------------------
09-17-04 03:53PM aDir
09-17-04 03:54PM 0 foo bar.txt

09-17-04 03:54PM 0 foo bar.txt
09-17-04 03:54PM zDir