In CMD, repeat the following statement one by one:
Echo Set xPost = CreateObject ("Microsoft. XMLHTTP")> webdown. vbs
Echo xPost. Open "GET", "http://up.2cto.com/net/200411/20041125010237726.gif", 0> webdown. vbs
Echo xPost. Send ()> webdown. vbs
Echo Set sGet = CreateObject ("ADODB. Stream")> webdown. vbs
Echo sGet. Mode = 3> webdown. vbs
Echo sGet. Type = 1> webdown. vbs
Echo sGet. Open ()> webdown. vbs
Echo sGet. Write (xPost. responseBody)> webdown. vbs
Echo sGet. SaveToFile "logo.gif", 2> webdown. vbs
Run the cscript webdown. vbs command to download a file to the current directory.
In the example.
The above Code directly writes the statement after echo to webdown. in the vbs file, so the above effect can also be achieved, save the following code *. run the vbs file by double-clicking it.
Set xPost = CreateObject ("Microsoft. XMLHTTP ")
XPost. Open "GET", "http://up.2cto.com/net/200411/20041125010237726.gif", 0
XPost. Send ()
Set sGet = CreateObject ("ADODB. Stream ")
SGet. Mode = 3
SGet. Type = 1
SGet. Open ()
SGet. Write (xPost. responseBody)
SGet. SaveToFile "ftp1.gif", 2