Python语言技术文档

微信小程序技术文档

php语言技术文档

jsp语言技术文档

asp语言技术文档

C#/.NET语言技术文档

html5/css技术文档

javascript

点击排行

您现在的位置:首页 > 技术文档 > asp函数/类库

asp遍历目录及子目录的函数

来源:中文源码网    浏览:174 次    日期:2024-04-23 01:08:51
【下载文档:  asp遍历目录及子目录的函数.txt 】


asp遍历目录及子目录的函数
<%@ 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 "
---" Response.write Objfile.name Next Response.write "

" Bianli(nowpath)'递归 Next Set Objfolder=nothing Set Objsubfolders=nothing Set Fso=nothing End Function %> <% Bianli("D:") '遍历d:盘 %>

相关内容