Option Explicit Dim objFSO, objFolder, strDirectory, year, month, day, date year = DatePart("yyyy",now) month = DatePart("m",now) day = DatePart("d",now) date = year & month & day strDirectory = "C:\Users\Bruce\Desktop\MIRL_local\projects_renu2\R2_Data\" & date ' Create FileSystemObject. So we can apply .createFolder method Set objFSO = CreateObject("Scripting.FileSystemObject") ' Here is the key line Create a Folder, using strDirectory Set objFolder = objFSO.CreateFolder(strDirectory) Call SaveImage("http://services.swpc.noaa.gov/images/ace-mag-swepam-6-hour.gif", date, "ace-mag-swepam-6-hour.gif") Call SaveImage("http://flux.phys.uit.no/Last24/Last24_lyr2a.gif", date, "Last24_lyr2a.gif") Call SaveImage("http://services.swpc.noaa.gov/images/goes-magnetometer.gif", date, "goes-magnetometer.gif") Call SaveImage("http://158.39.70.130/~kstdev/display/ESRlatest.png", date, "ESRlatest.png") Call SaveImage("http://tid.uio.no/plasma/allsky_camera/realtime/incoming/lyr_latest.png", date, "lyr_latest.png") Call SaveImage("http://tid.uio.no/plasma/allsky_camera/realtime/incoming/nya_latest.png", date, "nya_latest.png") Call SaveImage("http://kho.unis.no/Quicklooks/msp_keo.gif", date, "msp_keo.gif") Call SaveImage("http://kho.unis.no/Quicklooks%5CZWO%5CAllsky.jpg", date, "Quicklooks_ZWO_Allsky.jpg") Call SaveImage("http://aurora.phys.ucalgary.ca/summary_plots/rego-rt/live_feed/latest_LYRN.png?1448533062896", date, "latest_LYRN.png") Call SaveImage("http://services.swpc.noaa.gov/images/animations/GOES-15-CS-PTHNA-0.4/latest.png", date, "latest.png") Call SaveImage("http://www.eiscat.se/raw/rtg/Gup_42m.png", date, "Gup_42m.png") Call SaveImage("http://services.swpc.noaa.gov/images/ace-mag-6-hour.gif?time=1449569644000", date, "ace-mage-6-hour.gif") Sub SaveImage(url, dir, name) ' Set your settings Dim strFileURL, strHDLocation strFileURL = url strHDLocation = "C:\Users\Bruce\Desktop\MIRL_local\projects_renu2\R2_Data\" & date & "\" & name ' Fetch the file Dim objXMLHTTP Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") objXMLHTTP.open "GET", strFileURL, false objXMLHTTP.send() dim objADOStream 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 dim objFSO Set objFSO = Createobject("Scripting.FileSystemObject") If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation Set objFSO = Nothing objADOStream.SaveToFile strHDLocation objADOStream.Close Set objADOStream = Nothing End if Set objXMLHTTP = Nothing End Sub WScript.Quit