R
Rich Pasco
I am looking for a Win32 command-line (console) utility, suitable for
being driven from a BAT script, which accepts as input a URL and then
downloads the referenced web page (or other file) to my local disk.
The effect that I want to produce is exactly that I would get by right-
clicking on a link in a web browser and choosing from the popup menu
"save link target as..." except this one would be driven entirely from
the command line, without graphics, popups, or point-and-click.
I began to write my own, but it's harder than it looks; it involves
parsing the URL from the command line, to get the host name, issuing a
DNS query to get its IP address, opening a socket and speaking HTTP
to request the file, then interpreting the HTTP reply to reconstruct
the file and save it locally.
Might be easier if someone else has already done it.
Any suggestions?
- Rich
being driven from a BAT script, which accepts as input a URL and then
downloads the referenced web page (or other file) to my local disk.
The effect that I want to produce is exactly that I would get by right-
clicking on a link in a web browser and choosing from the popup menu
"save link target as..." except this one would be driven entirely from
the command line, without graphics, popups, or point-and-click.
I began to write my own, but it's harder than it looks; it involves
parsing the URL from the command line, to get the host name, issuing a
DNS query to get its IP address, opening a socket and speaking HTTP
to request the file, then interpreting the HTTP reply to reconstruct
the file and save it locally.
Might be easier if someone else has already done it.
Any suggestions?
- Rich