Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Feb : TidFTP no file size returned
| Subject: | TidFTP no file size returned |
| Posted by: | "Michael Fritz" (spam_athome@yahoo.de) |
| Date: | Wed, 14 Feb 2007 17:05:36 |
Hi,
Using Indy 10.1.15 in Turbo Delphi I'm trying to retrieve the file size of
a file located on a FritzBox (DSL router, linux OS).
While the IE6 shows the file size correctly, using the FTPClient demo of
Indy 10 is not able to get it in this line:
i := lbDirectory.ItemIndex;
if i <> -1 then
begin
s := lbDirectory.Items[i];
i := FTP.Size(s);
if i = -1 then << always returns -1
begin
// Directory
ChangeFTPDir(s);
end
else
As Size(s) always returns -1 for a file(!) it tries to change the directory
but throws an exceptions since this is not really a dir.
So, what's the deal here? Do I have to add a FTP parser as I've read in
some threads here?
--
cu,
Michael