var fso = new ActiveXObject("Scripting.FileSystemObject"), fd = fso.GetFolder("C:\\"); en = new Enumerator(fd.Files); for (; !en.atEnd(); en.moveNext()) { var f = en.item().Name; // }