What's the best way (or tool) on the Windows (Vista) command line to get size and modification time for a file on a remote webserver, without downloading it?
There is a Win32 port of wget that works decently.
PowerShell's Invoke-WebRequest -Method Head
would work as well.
If you cannot install aditional applications, then you can telnet (you will need to install this feature for your windows 7 by following this) the remote server:
TELNET server_name 80
followed by:
HEAD /virtual/directory/file.ext
or
GET /virtual/directory/file.ext
depending on if you want just the header (HEAD) or the full contents (GET)
On Linux, I often use curl with the --head parameter. It is available for several operating systems, including Windows.
[edit] related to the answer below, gknw.net is currently down as of February 23 2012. Check curl.haxx.se for updated info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With