SoFunction
Updated on 2025-04-11

VBS Tutorial: Properties - SubFolders Properties

SubFolders Properties

Returns a consisting of all subfolders (including hidden folders and system folders) in the specified folder.Foldersgather.

object.SubFolders

objectShould beFolderThe name of the object.

illustrate

The following code shows how to use itSubFoldersproperty:

Function ShowFolderList(folderspec)   Dim fso, f, f1, s, sf   Set fso = CreateObject("")   Set f = (folderspec)   Set sf =    For Each f1 in sf      s = s &        s = s & "<BR>"   Next   ShowFolderList = sEnd Function