Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set fc = f.Files For Each f1 in fc if right(lcase(f1.name),4) = ".jpg" then response.write(f1.name & "<br>" & vbcrlf) Next