ASP, FSO traversal directory and directory

xiaoxiao2021-03-06  110

ASP, FSO traversal directory and directory

<% @ Language = VBScript%> <% 'I wrote a traversal directory and a function of files under the directory,%> <% Function Bianli (PATH) SET FSO = Server.createObject ("scripting.filesystemObject") on Error ResMe 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) 'recursive next set objfolder = Nothing set objsubfolders = Nothing set fso = nothing end function%> <% bianli (" D: ") 'Traversing D: Disc%>

转载请注明原文地址:https://www.9cbs.com/read-100293.html

New Post(0)