ASP SubFolders Collection

Definition and Usage

The SubFolders collection can return a collection consisting of all subfolders in the specified folder.

Syntax:

FolderObject.SubFolders

实例

<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test\")
for each x in fo.SubFolders
  Print the name of all subfolders in the test folder
  Response.write(x.Name & "<br />")
next
set fo=nothing
set fs=nothing
%>

Output similar to this:

css
html
xml
asp
JavaScript