能统计数,但不是总数,只是每个文件夹内的文件数。怎样解决?
<%
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
Dim SubFile,i
i=0
For Each SubFile In Folder.Files
ReplaceFile(SubFile.Path)
i=i+1
Next
Response.Write i & "<br />"
End Sub
Sub ReplaceFile(FileName)
Response.Write FileName & "<br />"
End Sub
%>
[[it] 本帖最后由 thbwn 于 2008-8-5 16:19 编辑 [/it]]