How do I download files from server using vbscript

How do i simply download a file from a web server using vbscript with
no 3rd or additional tools ?

many thx
LVL 1
MKraussAsked:
Who is Participating?
 
KavarConnect With a Mentor Commented:
dim ie
set ie.createobject("internetexplorer.application")
ie.visible=false
ie.navigateto("<url here>")
do while ie.busy=true
wscript.sleep 60
loop
ie.document.execwb("saveas",2,<destinationpathhere>)
ie.quit
0
 
KavarCommented:
you con use the execwb command from the internetexplorer.application object

dim ie
set ie.createobject("internetexplorer.application")
ie.visible=false
ie.navigateto("<url here>")
ie.document.execwb("saveas",false,<destinationpathhere>)
ie.quit
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
KavarCommented:
ack!!!! its Navigate2
not navigateto


change
ie.navigateto("<url here>")

to
ie.navigate2("<url here>")
0
 
MKraussAuthor Commented:
hmmm,
i'm getting an error , can not use parantheses when calling a sub within

ie.document.execwb("saveas",false,"c:\")
or
ie.document.execwb("saveas",false,"c:\file.txt")

0
 
KavarCommented:
arg.....!!!!

(thats why i should test things first)
vbscript will not allow functions with multiple parameters to be called on the left side, to get around, change to...

call ie.document.execwb("saveas",false,"c:\file.txt")
0
 
MKraussAuthor Commented:
This shows me then a unsepcified error and the download dialog appears (open,save etc),
is there a way to fide it and do a auto save ?
0
All Courses

From novice to tech pro — start learning today.