Getting size of an URI file

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
 
A

Andrew Morton

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
 
K

kimiraikkonen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top