收集整理 时间是: 02/06/06 下午 01:17:43.
文件名称: jscolFiles.htm
页面标题: Files 集合  •  文件大小: 2279  •  最后更新: Mon, 06 Feb 2006 02:23:45 GMT

Files 集合

一个文件夹中所有 File 对象的集合。

说明

下面这个例子说明了如何获得一个 Files 集合以及如何使用 Enumerator 对象和 for 语句来遍历该集合:

function ShowFolderFileList(folderspec)
{
   var fso, f, f1, 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);
}

方法

Files 集合没有方法。

属性

Count 属性 | Item 属性

请参阅

Drive 对象 | Drives 集合 | File 对象 | Folder 对象 | Folders 集合