Download the file (finishing version) in CMD)

Source: Internet
Author: User

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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.