 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Liam Mullane Guest
|
Posted: Fri Jun 25, 2004 3:47 pm Post subject: Indy 9 FTP component |
|
|
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
|
Posted: Fri Jun 25, 2004 5:03 pm Post subject: Re: Indy 9 FTP component |
|
|
"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
|
Posted: Fri Jun 25, 2004 5:05 pm Post subject: Re: Indy 9 FTP component |
|
|
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 |
|
 |
|
|
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
|
|