您的位置:首页 > 编程语言 > VB

VBS教程:对象-Files 集合

2006-11-16 00:00 417 查看

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 = sEnd Function
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: