Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set xmlHTTP = CreateObject("Msxml2.XMLHTTP")
- xmlHTTP.Open "POST", strFileURL, False
- xmlHTTP.send
- If xmlHTTP.Status = 200 Then
- Set objADOStream = CreateObject("ADODB.Stream")
- objADOStream.Open
- objADOStream.Type = 1 'adTypeBinary
- objADOStream.Write xmlHTTP.ResponseBody
- objADOStream.Position = 0 'Set the stream position to the start
- Set objFSO = Createobject("Scripting.FileSystemObject")
- If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
- Set objFSO = Nothing
- objADOStream.SaveToFile strHDLocation
- objADOStream.Close
- Set objADOStream = Nothing
- End if
- Set xmlHTTP = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement