Here is some sample code from MSDN on using the FileSystemObject to enumerate the files inside of a folder ( http://msdn.microsoft.com/en-us/library/18b41306(VS.85).aspx):
code:
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);
}
something along those lines should do what you want, I'll see if I can cook that down a bit.
- Michael
|