FTP List Indy 10

Giganews Newsgroups
Subject: FTP List Indy 10
Posted by:  jeff.east…@networkautomation.com
Date: Fri, 8 Oct 2004

I am unable to get any listing with the FTP component.
I am able to get a raw listing by calling the List command and passing in a
TStringList, but the DirectoryListing property is never populated.

I see that other people have gotten this to work, does anyone have any idea
why this would fail for me.
I am not doing anything strange.  All default settings on the FTP component,
connecting to my local Windows XP machine, with a DOS listing format
specified in IIS.

I am doing this in C++ Builder 5, but I had the same problem using Delphi 7.

My code is simply:

ShowMessage( IdFTP1->DirectoryListing->Count );

I get 0 in the message box even though there are files and folders.
This code will give me the correct count.

TStringList    *Listing;

Listing = new TStringList();
IdFTP1->List(Listing, "", true);
ShowMessage( Listing->Count );
delete Listing;

Jeff Easton