Download a file via HTTP from a script in Windows
- by Jason R. Coombs
I want a way to download a file via HTTP given its URL (similar to how wget works). I've seen the answers to this question, but I have two changes to the requirements:
I'd like it to run on Windows 7 or later (though if it works on Windows XP, that's a bonus).
I need to be able to do this on a stock machine with nothing but the script, which should be text that could be easily entered on a keyboard or copy/pasted.
The shorter, the better.
So, essentially, I'd like a .cmd (batch) script, VBScript, or Powershell script that can accomplish the download. It could use COM or invoke IE, but it needs to run without any input, and should behave well when invoked without a display (such as through a telnet session).