源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2022-03-04 01:31 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要: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 "<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:盘  %>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部