Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for xhttpdmo.vbs

(view source code of xhttpdmo.vbs as plain text)

  1. Download "http://www.robvanderwoude.com/files/hardwinv.zip", "C:\hardwinv.zip"
  2.  
  3.  
  4. Sub Download( myFileURL, myDestFile )
  5. ' This function uses X-standards.com's X-HTTP component to download a file
  6. '
  7. ' Arguments:
  8. ' myFileURL  [string] the URL of the file to be downloaded
  9. ' myDestFile [string] the fully qualified path of the downloaded "target" file
  10. '
  11. ' Written by Rob van der Woude
  12. ' http://www.robvanderwoude.com
  13. '
  14. ' The X-HTTP component is available at:
  15. ' http://www.xstandard.com/page.asp?p=C8AACBA3-702F-4BF0-894A-B6679AA949E6
  16. ' For more information on available functionality read:
  17. ' http://www.xstandard.com/printer-friendly.asp?id=32ADACB9-6093-452A-9464-9269867AB16E
  18. 	Dim objHTTP
  19. 	Set objHTTP = CreateObject("XStandard.HTTP")
  20. 	objHTTP.Get myFileURL
  21. 	objHTTP.SaveResponseToFile myDestFile
  22. 	Set objHTTP = Nothing
  23. End Sub
  24.  

page last modified: 2024-04-16; loaded in 0.0156 seconds