您的当前位置:首页正文

asp遍历站点所有文件夹的代码

2024-06-09 来源:步旅网
asp遍历站点所有⽂件夹的代码

<%

fpath=Request.form(\"fpath\")

if fpath<>\"0\" and fpath<>Empty 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 %>

因篇幅问题不能全部显示,请点此查看更多更全内容