K
K
Kusmich2015-09-21 15:00:15
Programming
Kusmich, 2015-09-21 15:00:15

Download images by url to pc using vbs?

You need to download images by url using a vbs script, on a computer. Where can I find information on this topic?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Martyanov, 2015-09-21
@vilgeforce

Why vbs if there is wget? If vbs is required, look towards launching third-party applications like wget from vbs.

D
DVamp1r3, 2015-09-21
@DVamp1r3

as I understand it, vbs is launched independently, by the interpreter? If yes, google UrlDownloadToFile

O
omegastripes, 2015-09-27
@omegastripes

If we are talking about WSH VBS, here is the simplest example:

sUrl = "http://coverlib.com/Download/1729291/The_Prodigy-The_Fat_Of_The_Land_UK-Front-.JPG"
sPath = "C:\Test\cover.jpg"

With CreateObject("Microsoft.XMLHTTP")
  .Open "GET", sUrl, False
  .Send
  aContent = .ResponseBody
End With
With CreateObject("ADODB.Stream")
  .Type = 1 ' adTypeBinary
  .Open
  .Write aContent
  .SaveToFile sPath, 2 ' adSaveCreateOverWrite
  .Close
End With

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question