README.md
December 4, 2022 ยท View on GitHub
Description
This will list all the sub directories under a directory in a recursive manner. You may wish to remove the "msgbox" from the code and do something useful.
More Info
A directory name
As the process looks through all sub directories, it is a time consuming process. For testing purpose, use a directory which has few sub directories inside it.
| Submitted On | |
| By | Subodh Dash |
| Level | Intermediate |
| User Rating | 5.0 (10 globes from 2 users) |
| Compatibility | ASP (Active Server Pages), VbScript (browser/client side) |
Category |Files World |ASP / VbScript Archive File |
API Declarations
Free to use /Free to distribute
Source Code
Option Explicit
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
dim rd
rd = RecursiveDir ("c:\sheridan")
function RecursiveDir (path)
dim folderpath, fol, FolderName
Set folderpath = fso.getfolder(path)
Set fol = folderpath.SubFolders
For Each Foldername In fol
msgbox Foldername
RecursiveDir = FolderName
RecursiveDir FolderName
Next
end function