Visual Basic Scripting Edition | 語言參考 |
Files 屬性返回由指定文件夾中所有 File 對象(包括隱藏文件和系統(tǒng)文件)組成的 Files 集合。 object.Files
object 應為 Folder 對象的名稱。 說明以下代碼舉例說明如何使用 Files 屬性: Function ShowFileList(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
ShowFileList =s
End Function
請參閱Attributes 屬性 | DateCreated 屬性 | DateLastAccessed 屬性 | DateLastModified 屬性 | Drives 屬性 | IsRootFolder 屬性 | Name 屬性 | ParentFolder 屬性 | Path 屬性 | ShortName 屬性 | ShortPath 屬性 | Size 屬性 | SubFolders 屬性 | Type 屬性 應用于:Folder 對象
返回首頁 |