BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Indy 9 FTP component

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Liam Mullane
Guest





PostPosted: Fri Jun 25, 2004 3:47 pm    Post subject: Indy 9 FTP component Reply with quote



Hi,

I'm using Indy V9 FTP component as shown below but I have a problem
accessing the FTP filename, it shows the complete line with permissions file
size etc.
How do I parse this correctly? (using a unix FTP server).

TStringList *LS = new TStringList;
int numitems;

IdFTP1->Connect(true,10000);
IdFTP1->List(LS,"*.*",true);
DirectoryListBox->Items->Assign(LS);
numitems = IdFTP1->DirectoryListing->Count;
for (int i=0;i<numitems;i++)
{
Memo2->Lines->Add(IdFTP1->DirectoryListing->Items[i]->FileName);
}

IdFTP1->Disconnect();
delete LS;

thanks in advance,
Liam Mullane.


Back to top
Roddy Pratt
Guest





PostPosted: Fri Jun 25, 2004 5:03 pm    Post subject: Re: Indy 9 FTP component Reply with quote



"Liam Mullane" <STOPSPAM.lmullane (AT) dairymaster (DOT) com> wrote

Quote:
I'm using Indy V9 FTP component as shown below but I have a problem
accessing the FTP filename, it shows the complete line with permissions
file
size etc.
How do I parse this correctly? (using a unix FTP server).


Hi Liam,

I would try asking this in one of the Indy forums at
news://news.atozedsoftware.com - you may get a more informed response.

Your code looks OK to me, and Indy claims to detect and parse the standard
unix FTP directory format - I haven't tried this myself, though. You could
check what the value of IdFTP1->DirectoryListing->ListFormat is correctly
set to flfUnix?

Hope that helps.
- Roddy



Back to top
Mortz
Guest





PostPosted: Fri Jun 25, 2004 5:05 pm    Post subject: Re: Indy 9 FTP component Reply with quote



TStringList *fileList;
fileList=new TStringList;
//fill connection parameters
//...
IdFTP1->Connect(true,5000);
//change dir (optional)
IdFTP1->List(fileList,Label1->Caption,false); //the last parameter actually
does the trick... if set tu true, it displays permissions...


Hope this helps...

<MortZ>


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.