asp遍歷目錄及子目錄的函數(shù)
更新時(shí)間:2008年07月22日 08:54:21 作者:
asp遍歷目錄以及目錄下文件的函數(shù)- 從網(wǎng)上找的不過(guò)都用不了,自己用Emeditor修正了一下
<%@ Language=vbscript %>
<%
'遍歷目錄以及目錄下文件的函數(shù)
%>
<%
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:盤
%>
<%
'遍歷目錄以及目錄下文件的函數(shù)
%>
<%
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:盤
%>
相關(guān)文章
asp 網(wǎng)站靜態(tài)化函數(shù)代碼html
asp 網(wǎng)站靜態(tài)化代碼html,具體的功能大家可以測(cè)試下。2009-09-09ASP運(yùn)行出錯(cuò):缺少對(duì)象: ''xmlDoc.documentElement''錯(cuò)誤解決方法
ASP運(yùn)行出錯(cuò):缺少對(duì)象: 'xmlDoc.documentElement'錯(cuò)誤解決方法,需要的朋友可以參考下2012-03-03在ASP中連接MySQL數(shù)據(jù)庫(kù),最好的通過(guò)ODBC方法
在ASP中連接MySQL數(shù)據(jù)庫(kù),最好的通過(guò)ODBC方法...2006-11-11asp 實(shí)現(xiàn)對(duì)SQL注入危險(xiǎn)字符進(jìn)行重編碼處理的函數(shù)
asp 實(shí)現(xiàn)對(duì)SQL注入危險(xiǎn)字符進(jìn)行重編碼處理的函數(shù)...2007-08-08垃圾引用防治補(bǔ)丁以及發(fā)送引用修正補(bǔ)丁的自動(dòng)安裝程序
垃圾引用防治補(bǔ)丁以及發(fā)送引用修正補(bǔ)丁的自動(dòng)安裝程序...2007-02-02