Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Could anyone help me with a VB script that downloads single/multiple file/s to a directory.
I am testing some examples but without any results:
UrlDownloadToFile, http://...... .pdf, D:\test.pdf
or
URLDownloadToFile 0, _
"http://..... .pdf", _
"D:\test.pdf", 0, 0
Thanks in advance!
ps prefer script for multiples files if any
HI,
Here is the macro which i got from web. Not sure will this work or not.
Sub Download( myFileURL, myDestFile )
' This function uses X-standards.com's X-HTTP component to download a file
'
' Arguments:
' myFileURL [string] the URL of the file to be downloaded
' myDestFile [string] the fully qualified path of the downloaded "target" file
'
' Written by Rob van der Woude
' http://www.robvanderwoude.com
'
' The X-HTTP component is available at:
' http://www.xstandard.com/page.asp?p=C8AACBA3-702F-4BF0-894A-B6679AA949E6
' For more information on available functionality read:
' http://www.xstandard.com/printer-friendly.asp?id=32ADACB9-6093-452A-9464-9269867AB16E
Dim objHTTP
Set objHTTP = CreateObject("XStandard.HTTP")
objHTTP.Get myFileURL
objHTTP.SaveResponseToFile myDestFile
Set objHTTP = Nothing
End Sub
Regards,
Kaushik Solanki
Ohh
Can't manage to do that works. I have search and tried another examples but without any success.
Hi Ivan,
I'd rather use wget or something similar and call if from macro (if any) to get the files you want, using the Launch member of the Application class in the API (check the APIGuide.qvw file for further reference and examples).
Hope that helps.
BI Consultant
No , I don't want using any other programs to do that.
Using macro is better for my purposes.
Any other ideas of macro doing the download function?
Tnx
Hi,
Googling returns a good bunch of VBScript examples either using proprietary controls or making use of the FTP command already existing in the Windows operating system, which probably assures the portability. You will need an external control or application anyway unless you use the "Use FTP" check in the script editor dialog (if that helps).
Note that in the server-client environment there are some macros that are not triggered (On Open, On Post Reload...) although they should work manually with the plugin or desktop clients.
Regards.
BI Consultant
Other ideas ?
Thanks!
Has anyone some examples
thx