返回一個(gè) Files 集合,由指定文件夾中包含的所有 File 對(duì)象組成,包括設(shè)置了隱藏和系統(tǒng)文件屬性的文件。
object.Files
object 應(yīng)為 Folder 對(duì)象。
下面的代碼說明了 Files 屬性的用法:
[JScript] function ShowFolderFileList(folderspec) { var fso, f, fc, s; fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.GetFolder(folderspec); fc = new Enumerator(f.files
); s = ""; for (; !fc.atEnd(); fc.moveNext()) { s += fc.item(); s += "<br>"; } return(s); } [VBScript]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 屬性 | Drive 屬性 | IsRootFolder 屬性 | Name 屬性 | ParentFolder 屬性 | Path 屬性 | ShortName 屬性 | ShortPath 屬性 | Size 屬性 | SubFolders 屬性 | Type 屬性
應(yīng)用于:Folder 對(duì)象