code:
files = new Array();
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder({folderpath}); //put folder path here with // instead of just /
fc = new Enumerator(f.files);
i = 0;
for (; !fc.atEnd(); fc.moveNext())
{
files[i] = fc.item();
i++;
}
This will return the files within the folder in an array for you.