Re: File Size

Giganews Newsgroups
Subject: Re: File Size
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Tue, 23 May 2006

"Sam" <sa…@invomax.com> wrote in message
news:96653A8F95F9E240sa…@invomax.com...

> Is there any way to get the file size from the IDHeaderList?

TIdFTP does not use TIdHeaderList.

There are two ways to get a remote file's size with the FTP protocol:

1) if the server supports the SIZE command, then use the TIdFTP.Size()
method.

2) get a directory listing that contains the file.  The file size will be an
attribute of the file in the listing.  The TIdFTP.DirectoryListing property
is a collection of TIdFTPListItem objects.  TIdFTPListItem has a Size
property.

Gambit

Replies

In response to

File Size posted by Sam on Tue, 23 May 2006