can anyone make necessary changes to this script and post it back here? it should work with both google and yahoo and let user download IEOD without any tool.
Set args = WScript.Arguments
filename = "D:\Main\Tools\VBdown\Exchanges\nyse.txt" '/ Change your ticker/symbol list here.
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fspenTextFile(filename)
Do Until f.AtEndOfStream
ticker = f.ReadLine
Url = "http://ichart.finance.yahoo.com/table.csv?s="&ticker&"&a=04&b=15&c=2014&d=04&e=29&f=2014&g=d&ignore=.csv" '/ change date here, format is MDY
'/ If yahoo made changes in future, you can simple change the url here and it will work just fine.
'/ Link http://finance.yahoo.com/q/hp?s=IBM&a=04&b=1&c=2014&d=04&e=15&f=2014&g=d
dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
dim bStrm: Set bStrm = createobject("Adodb.Stream")
xHttp.Open "GET", Url, False
xHttp.Send
with bStrm
.type = 1 '//binary
.open
.write xHttp.responseBody
.savetofile "D:\Main\Tools\VBdown\nyseEOD\"&ticker&".csv" , 2 '//overwrite. Change Path here
end with
Loop
f.Close
'/by Einstein : 17 may 2014
Sample URL: https://finance.google.com/finance/getprices?q=HCLTECH&x=NSE&i=300&p=15d&f=d,c,o,h,l,v
Set args = WScript.Arguments
filename = "D:\Main\Tools\VBdown\Exchanges\nyse.txt" '/ Change your ticker/symbol list here.
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fspenTextFile(filename)
Do Until f.AtEndOfStream
ticker = f.ReadLine
Url = "http://ichart.finance.yahoo.com/table.csv?s="&ticker&"&a=04&b=15&c=2014&d=04&e=29&f=2014&g=d&ignore=.csv" '/ change date here, format is MDY
'/ If yahoo made changes in future, you can simple change the url here and it will work just fine.
'/ Link http://finance.yahoo.com/q/hp?s=IBM&a=04&b=1&c=2014&d=04&e=15&f=2014&g=d
dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
dim bStrm: Set bStrm = createobject("Adodb.Stream")
xHttp.Open "GET", Url, False
xHttp.Send
with bStrm
.type = 1 '//binary
.open
.write xHttp.responseBody
.savetofile "D:\Main\Tools\VBdown\nyseEOD\"&ticker&".csv" , 2 '//overwrite. Change Path here
end with
Loop
f.Close
'/by Einstein : 17 may 2014
Sample URL: https://finance.google.com/finance/getprices?q=HCLTECH&x=NSE&i=300&p=15d&f=d,c,o,h,l,v