ASP functions for traversing directories and files in directories - I couldn’t find any of them on the Internet, so I corrected them using Emeditor <%@ Language=vbscript %>
<%
'Function to traverse directories and files under directories
%>
<%
FunctionBianli(path)
Set Fso=server.createobject(scripting.filesystemobject)
On Error Resume Next
Set Objfolder=fso.getfolder(path)
Set Objsubfolders=objfolder.subfolders
For Each Objsubfolder In Objsubfolders
Nowpath=path + / + Objsubfolder.name
Response.write Nowpath
Set Objfiles=objsubfolder.files
For Each Objfile In Objfiles
Response.write <br>---
Response.write Objfile.name
Next
Response.write <p>
Bianli(nowpath)'recursive
Next
Set Objfolder=nothing
Set Objsubfolders=nothing
Set Fso=nothing
End Function
%>
<%
Bianli(D:) 'Traverse the d: disk
%>