URL,Filename "http://www.polysyncronism.com/pics/heart.jpg","c:\work\pics\myheart.jpg" "http://www.polysyncronism.com/pics/ovaltine.jpg","c:\work\pics\myovaltine.jpg"
Make a directory named c:\work and create the VBScript file
On Error Resume Next Const adOpenStatic = 3 Const adLockOptimistic = 3 Const adCmdText = &H0001 Set objConnection = CreateObject("ADODB.Connection") Set objRecordSet = CreateObject("ADODB.Recordset") strPathtoTextFile = "C:\work\" objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & strPathtoTextFile & ";" & _ "Extended Properties=""text;HDR=YES;FMT=Delimited""" objRecordset.Open "SELECT URL,Filename FROM URLList.csv", _ objConnection, adOpenStatic, adLockOptimistic, adCmdText Do Until objRecordset.EOF WScript.Echo "Processing File" + objRecordset.Fields.Item("Filename") URL = objRecordset.Fields.Item("URL") saveTo = objRecordset.Fields.Item("Filename") ' Fetch the file Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.6.0") objXMLHTTP.send() If objXMLHTTP.Status = 200 Then Set objADOStream = CreateObject("ADODB.Stream") objADOStream.Open objADOStream.Type = 1 'adTypeBinary objADOStream.Write objXMLHTTP.ResponseBody objADOStream.Position = 0 'Set the stream position to the start Set objFSO = Createobject("Scripting.FileSystemObject") If objFSO.Fileexists(saveTo) Then objFSO.DeleteFile saveTo Set objFSO = Nothing objADOStream.SaveToFile saveTo objADOStream.Close Set objADOStream = Nothing End if Set objXMLHTTP = Nothing objRecordset.MoveNext Loop