<%
set A=server.createobject("scripting.filesystemobject")
path="G:\count\0"
i=0
response.write "主目录:<br>"&path&"<ul>"
re
response.write "</li></ul>" '-----------------主目录
sub re()
B=B&i
C=C&i
D=D&i
E=E&i
set B=A.getfolder(path) '----------------------主目录下文件
if i>=2 then response.write "<ul>"
for each E in B.files
response.write "<li>"&E.name&"</li>"
next
if i>=2 then response.write "</ul>"
'----------------------End '---------------------------主目录下文件夹 set C=B.SubFolders
if i>=2 then response.write "<ul>"
for each D in C
response.write "<li><b>"&D.name&"</b><font color=#c0c0c0>(DIR)</font>"
i=i+1
path=D
re2 '显示子目录
next
if i>=2 then response.write "</ul>"
'---------------------------End
end sub '-----------------次目录
sub re2()
B=B&i
C=C&i
D=D&i
set B=A.getfolder(path) '-----------------------------次目录下文件
response.write "<ul>"
for each E in B.files
response.write "<li>"&E.name&"</li>"
next
response.write "</ul>"
'-----------------------------End '-----------------------------次目录下文件夹
set C=B.SubFolders
response.write "<ul>"
for each D in C
response.write "<li><b>"&D.name&"</b><font color=#c0c0c0>(DIR)</font></li>"
i=i+1
path=D
re '显示子目录
next
response.write "</ul>" '-----------------------------End
end sub
%>