代码如下: <% dim fso,objFolder,objFiles dim filelist Set fso=Server.CreateObject(“scripting.FileSystemObject”) Set objFolder=fso.GetFolder(server.MapPath(“thumbs”)) Set objFiles=objFolder.Files ‘循环输出文件夹path下的文件的文件名 For each objFile in objFiles If getExt(objFile.name)=”gif” or getExt(objFile.name)