"Eve" <(E-Mail Removed)> wrote in message
news:124E4F2B-F14B-47CB-8849-(E-Mail Removed)...
> Anyone knows how to copy a web image (weather image), daily from internet
> into a local folder??
>
> I tried this:
> C:\>xcopy
> "http://image.espanol.weather.com/web/maps/es_ES/weather/forecast/spain_outlook_day1_277_sp.jpg"
> c:\
> 0 files copied
>
> Thanks in advance!!
You need to use VBscript or a program to do this. Replace "c:\" with the
path indicating where you want your images saved.
Source Michael Harris & Alex K. Angelopoulos
http://www.google.com/groups?selm=0e...280a%40phx.gbl
-------------- save lines below in a file with .vbs
extension -----------------------
ImgName = "spain_outlook_day1_277_sp.jpg"
SaveName = "c:\" & ImgName
Url = "http://image.espanol.weather.com/web/maps/es_ES/weather/forecast/" &
_
ImgName
DownBinFile SaveName, Url
Wscript.Echo "Download of", SaveName, " is complete."
Sub DownBinFile(FilePath, sURL)
const adTypeBinary = 1
const adModeReadWrite = 3
const adSaveCreateOverwrite = 2
' Create an xmlhttp object:
set oXML = CreateObject("Microsoft.XMLHTTP")
oXML.open "GET", sURL, False
oXML.send
With CreateObject("ADODB.Stream")
.type = adTypeBinary
.mode = adModeReadWrite
.open
On Error Resume Next
Do
Wscript.Sleep 250
.write oXML.responseBody
Loop Until Err = 0
.savetofile FilePath, adSaveCreateOverwrite
End With
End Sub