Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

ASP SubFolders Collection

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The ASP SubFolders Collection is used to return the collection of all the subfolder in a specified folder. 

Syntax:

FolderObject.SubFolders

Example: The below code demonstrates the ASP Folder.SubFolders Collection.

ASP




<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
  
'Get the folder to be read
set fo=fs.GetFolder("d:\GFG\")
  
'Loop through the subfolders in the folder
for each x in fo.SubFolders
  'Print the name of all subfolders in the GFG folder
  Response.write("Subfolder Name: " & x.Name & "<br>")
next
  
set fo=nothing
set fs=nothing
%>

Output:

Subfolder Name: html
Subfolder Name: css
Subfolder Name: asp
Subfolder Name: vbscript
My Personal Notes arrow_drop_up
Last Updated : 19 Mar, 2021
Like Article
Save Article
Similar Reads
Related Tutorials