File Size Download

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
FernandoFarah
Posts: 10
Joined: Mon 21 Jan 2019 12:35

File Size Download

Post by FernandoFarah » Tue 23 Jun 2020 14:27

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.

ViktorV
Devart Team
Posts: 2836
Joined: Wed 30 Jul 2014 07:16

Re: File Size Download

Post by ViktorV » Fri 26 Jun 2020 17:44

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;

FernandoFarah
Posts: 10
Joined: Mon 21 Jan 2019 12:35

Re: File Size Download

Post by FernandoFarah » Fri 26 Jun 2020 19:16

ViktorV thanks. Its Working.

ViktorV
Devart Team
Posts: 2836
Joined: Wed 30 Jul 2014 07:16

Re: File Size Download

Post by ViktorV » Wed 01 Jul 2020 16:43

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.

Post Reply