🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #780

Re: C++ Builder 2007 - IdFTP versus List()

#780
From: Remy Lebeau (TeamB)
Date: Tue, 06 Nov 2007 17:27
43 lines
2267 bytes
"Dmitri L." <nospam@nospam.com> wrote in message 
news:47306457@newsgroups.borland.com...

> I'm trying to get a detailed list of files from a IIS 6.0 webserver
> using IdFTP (v10.1.5) and C++ Builder 2007

10.1.5 is an old version of Indy 10.  It shipped with BDS 2006.  Try going 
to Indy's website and upgrade to the current 10.2.3 snapshot.

> IdFTP1->Connect();
>
> if(IdFTP1->Connected())

You don't need to call Connected().  If Connect() fails, it will throw an 
exception.

>          IdFTP1->TransferType = ftASCII;

You don't need to set the TransferType before calling List().  List() does 
that internally for you.

>          IdFTP(NULL, "", true);

That is not a valid statement.  I assume you meant this instead:

    IdFTP->List(NULL, "", true);

> catch(Exception &exception)

Always catch exceptions by 'const' reference instead:

    catch(const Exception &exception)

> The error is 'EDivByZero' and the 'ListResult' is empty.

What does the actual raw listing data look like?  You can use an external 
packet sniffer, such as Ethereal/Wireshark, to find out.  Also, which 
IdFTPListParse... units have you included in your code for TIdFTP to use for 
parsing the data?


Gambit 
Technical Details
Message-ID: <4730a4d6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47306457@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fdcb4b45839737d8
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <47306457@newsgroups.borland.com>
Subject: Re: C++ Builder 2007 - IdFTP versus List()
Date: Tue, 6 Nov 2007 09:27:47 -0800
Lines: 45
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 207.178.157.90
Message-ID: <4730a4d6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1194370262 207.178.157.90 (6 Nov 2007 09:31:02 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail