怎样获取文件夹内文件个数
如题,包括其子文件夹内的文件。谢谢
<% Server.ScriptTimeout=200 Dim fso Set fso=Server.CreateObject("Scripting.FileSystemObject") Dim Folder,A_File Set Folder=fso.GetFolder(Server.MapPath("/bbs/")) Response.Write Folder.Path ReplaceFolder(Folder) Sub ReplaceFolder(Folder) Dim SubFolder For Each SubFolder In Folder.SubFolders ReplaceFolder(SubFolder) Next ' SubFolder Dim SubFile For Each SubFile In Folder.Files ReplaceFile(SubFile.Path) Next End Sub Sub ReplaceFile(FileName) 'Response.Write FileName & "<br />" On Error Resume Next If Instr(LCase(FileName),"asa")>0 then Response.Write FileName & "<BR />" End Sub %>