How to use VBS executable + Xmlhttp to download and back up online files
This article mainly introduces how to use VBS executable program + Xmlhttp to download and backup online files, the article is very detailed, has a certain reference value, interested friends must read it!
Today, when I was writing the program, I suddenly thought of making a backup of the files and backing up the database on the website to the local computer. A simple Mini Program, made into an executable file, is the most simple and convenient to use VBS. 'On Error Resume Next
Dim iRemote,iLocal
IRemote = InputBox ("Please enter remote file path:")
Set xPost = CreateObject ("Microsoft.XMLHTTP")
XPost.Open "GET", iRemote,0
XPost.Send ()
Set stream = CreateObject ("ADODB.Stream")
Stream.Mode = 3
Stream.Type = 1
Stream.Open ()
Stream.Write (xPost.responseBody)
If (stream.size