[點晴永久免費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 編輯過 |
關鍵字查詢
相關文章
正在查詢... |