[点晴永久免费OA]asp遍历目录及子目录的函数
当前位置:点晴教程→点晴OA办公管理信息系统
→『 经验分享&问题答疑 』
<%@ Language=vbscript %>
<% '遍历目录以及目录下文件的函数 Function Bianli(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)'递归 Next Set Objfolder=nothing Set Objsubfolders=nothing Set Fso=nothing End Function Bianli("D:") '遍历d:盘 %> 该文章在 2022/6/21 23:22:50 编辑过 |
关键字查询
相关文章
正在查询... |