omegastripes

FileDownload.vbs

Feb 9th, 2016
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FileDownload "http://www.planwallpaper.com/static/images/518079-background-hd.jpg", "C:\Users\DELL\Desktop\pic.jpg"
  2.  
  3. Sub FileDownload(strURL, strPath)
  4.     Dim arrBody
  5.     With CreateObject("Microsoft.XMLHTTP")
  6.         .Open "GET", strURL, False
  7.         .Send
  8.         arrBody = .responseBody
  9.     End With
  10.     With CreateObject("ADODB.Stream")
  11.         .Type = 1
  12.         .Open
  13.         .Write arrBody
  14.         .SaveToFile strPath, 2
  15.         .Close
  16.     End With
  17. End Sub
Add Comment
Please, Sign In to add comment