Visual Basic Scripting Edition | 語言參考 |
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 集合
返回首頁
|