vbscript - easiest way to download a file -
there many examples on internet , simplest/easiest beginner seems be:
dim xhttp: set xhttp = createobject("microsoft.xmlhttp") dim bstrm: set bstrm = createobject("adodb.stream") xhttp.open "get", "http://bla.com/ea_csv_160126.csv", false xhttp.send bstrm .type = 1 '//binary .open .write xhttp.responsebody .savetofile "c:\myfolder\ea_csv_160126.csv", 2 '//overwrite end
this returns:
write file failed code: 800a0bbc source adodb.stream
i debug one, there people complaining error no fix.
also, if possible, define variable in order hold value date. script should able download file website adapting changed value in url 160126
else. note: on same website, there file has same name ea_csv_update_160126.csv
, 1 update shouldn't taken.
edit:
if know simpler or equally easy solution works, please post it.
Comments
Post a Comment