Might require a bit of trial and error, but you should be able to make the
HTTP GET request and then grab the Content-Length: attribute off the
server's header response without having to download the actual file...
Perhaps you could create a new TCP socket connection and connect to
www.virtualwareproducts.com on port 80, then once connection is established,
send:
GET /virtuadisk/virtuadisksetup.exe
Server should return something similar to this at the beginning:
Date: Sun, 02 Jan 2005 00:00:27 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 1515
Then only listen for a couple hundred bytes and parse Content-Length out of
it (regular expressions?), then terminate the connection.
HTH,
Brandon
"ViRtUaLpCwHiZ" <Vi***********@discussions.microsoft.com> wrote in message
news:FC**********************************@microsof t.com...
How would I get the size (In bytes or kilobytes) of a file on a typical
HTTP web server. For example, I would like to get the file size of this file:
http://www.virtualwareproducts.com/v...adisksetup.exe
-Jason