<% 'Desc : ASP6.0 (VB) 获取目录下所有图片文件 'by : wgscd 'date : 2024-2-1 dim c_path c_path=Server.MapPath( "./") set file_system=createobject("scripting.filesystemobject") getFile(c_path) sub getFile(c_path) dim strResult dim count set cur_folder=file_system.getfolder(c_path) 'response.Write("count:" & cur_folder.files.count) set sub_files=cur_folder.files for each each_file in sub_files name=each_file.name'取文件名 if instr(".jpg .png .bmp", right(lcase(name),4)) >0 then count=count+1 strResult = strResult & "<img width='200' src='" & each_file.name &"'> </img>" end if next response.Write("count:" & count & "<br/>" &strResult) end sub %>
标签:count,VB,end,strResult,ASP6.0,目录 From: https://www.cnblogs.com/wgscd/p/18000739