Re: Transfer file from VBS via HTTP
From: Don Grover (dgrover_at_assoft.com.au)
Date: 03/10/05
- Next message: Steve Fulton: "Re: Blocking right mouse click to copy items on html internet page"
- Previous message: Graham: "Pass a Parameter from VB Script to Crystal"
- In reply to: Tarllem: "Transfer file from VBS via HTTP"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Mar 2005 21:54:37 +1100
"Tarllem" <no@no.no> wrote in message
news:%23wIvz5VJFHA.2928@TK2MSFTNGP10.phx.gbl...
> Hi!
>
> You know how VBS can transfer file via HTTP?
>
Like this !
'************************************
sSource = "http://www.assoft.com.au/images/headpic.gif"
sDest = "test.gif"
set oHTTP = WScript.CreateObject("Microsoft.XMLHTTP")
oHTTP.open "GET", sSource, False
oHTTP.send
tStart = timer()
set oStream = createobject("adodb.stream")
Const adTypeBinary = 1
Const adSaveCreateNotExist = 1
Const adSaveCreateOverWrite = 2
oStream.type = adTypeBinary
oStream.open
oStream.write oHTTP.responseBody
oStream.savetofile sDest, adSaveCreateOverWrite
set oStream = nothing
tElapsed = timer() - tStart
set oHTTP = nothing
WScript.Echo "Done! " & tElapsed & " seconds..."
'************************************
- Next message: Steve Fulton: "Re: Blocking right mouse click to copy items on html internet page"
- Previous message: Graham: "Pass a Parameter from VB Script to Crystal"
- In reply to: Tarllem: "Transfer file from VBS via HTTP"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|