Microsoft(R) Visual Basic(R) Scripting Edition
Folders 集合
语言参考
起始页 | 版本 3

请参阅                   属性                   方法


描述
包含在一个 Folder 对象中的所有 Folder 对象的集合。
说明
以下代码举例说明如何获得 Folders 集合并使用 For Each...Next 语句枚举集合成员:
 Function ShowFolderList(folderspec) 
    Dim fso, f, f1, fc, s
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFolder(folderspec)
    Set fc = f.SubFolders
    For Each f1 in fc
        s = s & f1.name 
        s = s & "<BR>"
    Next
    ShowFolderList = s
End Function

(C) 1998 Microsoft Corporation. All rights reserved. Terms of Use.