Option Explicit Const ForReading = 1, ForWriting = 2, ForAppending = 8 Dim fso: Set fso = CreateObject("Scripting.FileSystemObject") Dim wsh: Set wsh = CreateObject("WScript.Shell") Dim inputFile Dim inputFilePath: inputFilePath = wsh.ExpandEnvironmentStrings(WScript.Arguments(0)) Dim filesToDownload Dim filePath Dim fileCount: fileCount = 0 Dim currentDirectory: currentDirectory = fso.GetAbsolutePathName(".") WriteLog "Opening input file: " & inputFilePath Set inputFile = fso.OpenTextFile(inputFilePath, ForReading) filesToDownload = Split(inputFile.ReadAll, vbNewLine) Call inputFile.Close() For Each filePath In filesToDownload DownloadFile filePath, fso.BuildPath(currentDirectory, fso.GetFileName(filePath)) fileCount = fileCount + 1 Next WriteLog "Finished, downloaded " & CStr(fileCount) & " files." Function DownloadFile(source, destination) Dim xmlHTTP: Set xmlHTTP = CreateObject("MSXML2.XMLHTTP") Dim adoStream WriteLog "Downloading file: " & source xmlHTTP.open "GET", source, false Call xmlHTTP.send() If xmlHTTP.Status = 200 Then WriteLog "Writing downloaded file to: " & destination Set adoStream = CreateObject("ADODB.Stream") adoStream.Open adoStream.Type = 1 'adTypeBinary adoStream.Write xmlHTTP.ResponseBody adoStream.Position = 0 If fso.FileExists(destination) Then fso.DeleteFile destination, True End If adoStream.SaveToFile destination adoStream.Close Set adoStream = Nothing End if Set xmlHTTP = Nothing End Function Sub WriteLog(line) '// This would be replaced with your own logging method, right now it will just echo WScript.Echo line End Sub