返回由指定文件夹中所有子文件夹(包括隐藏文件夹和系统文件夹)组成的 Folders 集合。
object.SubFolders
object 应为 Folder 对象的名称。
以下代码举例说明如何使用 SubFolders 属性:
Function ShowFolderList(folderspec) Dim fso, f, f1, s, sf Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set sf = f.SubFoldersFor Each f1 in sfs = s & f1.names = s & "<BR>"NextShowFolderList = sEnd Function