?
This document uses PHP Chinese website manual Release
JScript? | 語言參考 |
一個(gè)文件夾中所有 File 對象的集合。
下面這個(gè)例子說明了如何獲得一個(gè) 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 集合