Page 1 of 1

File Size Download

Posted: Tue 23 Jun 2020 14:27
by FernandoFarah
Hello guys, how can I get the file size for a download progress?

I tried some properties but to no avail.

Is there a property that returns the size?

tks.

Re: File Size Download

Posted: Fri 26 Jun 2020 17:44
by ViktorV
You can get the size of the downloaded file using the TScSFTPFileAttributes.Size property: https://devart.com/sbridge/docs/tscsftp ... s_size.htm
You can use the following recommendations to get the size of the downloaded file file:
- get file attributes and file size using the TScSFTPClient.RetrieveAttributes method;
For example:

Code: Select all

var
  Attrs: TScSFTPFileAttributes;
...
  aAttr := TScSFTPFileAttributes.Create;
  try
    ScSFTPClient.RetrieveAttributes(aAttr, GetRootDir + Node.Text);
  finally
    aAttr.Free;
  end;

Re: File Size Download

Posted: Fri 26 Jun 2020 19:16
by FernandoFarah
ViktorV thanks. Its Working.

Re: File Size Download

Posted: Wed 01 Jul 2020 16:43
by ViktorV
Thank you for the interest to our product.
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.