您的位置:寻梦网首页编程乐园VBScriptVBScript 语言参考 5.5

Files 集合

文件夹中所有 File 对象的集合.

说明

以下代码举例说明如何获得 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.Files
    For Each f1 in fc
        s = s & f1.name 
        s = s & "<BR>"
    Next
    ShowFolderList = s
End Function

属性

Count 属性 | Item 属性

方法

Files 集合无任何方法。

请参阅

Drive 对象 | Drives 集合 | File 对象 | Folder 对象 | Folders 集合


© 2000 Microsoft Corporation 版权所有。保留所有权利。使用规定。