©
本文檔使用php中文網手册發布
| JScript | 语言参考 |
一个文件夹中所有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 += "
";}return(s);}
Files集合没有方法。
Count 属性 | Item 属性
Drive 对象 | Drives 集合 | File 对象 | Folder 对象 | Folders 集合