<!–
body{font-size:12px;}
–>
<!–
sub fsubmit()
form1.submit
End sub
–>
–请选择–
整个站点
当前目录
<%
Dim fso,objfolder,objfile,strpath
set fso=server.createobject(“Scripting.FileSystemObject”)
strpath=”.”
call bl(strpath)
function bl(strpath)
set objfolder=fso.getfolder(server.mappath(strpath))
for each objsubfolder in objfolder.subfolders
Response.write “” & replace(strpath,”.”,””) & “\” & objsubfolder.name & “”
call bl(strpath & “\” & objsubfolder.name)
next
End function
%>
<%
fpath=Request.form(“fpath”)
if fpath”0″ and fpathEmpty then
Response.write “当前文件夹:” & replace(fpath,”.”,””) & “
”
set objfolder=fso.getfolder(server.mappath(fpath))
for each objsubfolder in objfolder.subfolders
Response.write “子文件夹名称:” & objsubfolder.name & “
”
next
Response.write “
”
for each objfile in objfolder.files
Response.write “文件名称:” & objfile.name & “
”
next
set objfolder=nothing
End if
%>