Getting size of an URI file

  • Thread starter Thread starter kimiraikkonen
  • Start date Start date
K

kimiraikkonen

I'd like to know if there's a class that supports to get a file size
which is located on a web-server like http or ftp. As well,
"system.io.fileinfo" and "FileLen" functions will only support local
files such as the ones on harddrive. And retrieving file's size of a
http / ftp file is NOT supported.

I only found out that webbrowser control provides such-like a function
with "documentstream.length" property that returns of only the
documents size, not of a file such as .exe, .jpg etc...

How can i get size of a file that's on a http / ftp server in bytes?

Thanks
 
kimiraikkonen said:
How can i get size of a file that's on a http / ftp server in bytes?

Http: Write a program to run on the server which can be queried for the size
of the file (e.g. an aspx page). But be careful not to make a security hole
with it.
FTP: Use FTP to get the file size.

Andrew
 
Http: Write a program to run on the server which can be queried for the size
of the file (e.g. an aspx page). But be careful not to make a security hole
with it.
FTP: Use FTP to get the file size.

Andrew

Andrew, i do not own a server. I wanted to calculate the total size of
a external http / ftp file in order to try to create a VB.NET
downloader application that shows totalsize / downloaded percentage
etc.
 
Back
Top