Visual Basic Scripting Edition | 語言參考 |
返回由指定文件夾中所有 File 對象(包括隱藏文件和系統(tǒng)文件)組成的 Files 集合。
object.Files
object 應(yīng)為 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 屬性
應(yīng)用于:Folder 對象