Hi SnuZZer,
Look at this:
code:
//...............
function ListDirectory(Directory)
{
f = fso.GetFolder(Directory);
var f1 = new Enumerator(f.files);
for (; !f1.atEnd(); f1.moveNext()) {
FileName = f1.item(); // GET the filename
// Here, you get the file name in the variable 'FileName', and, that's all !! If you want to display the filename, in a Toast, for example, you may use that :
MsgPlus.DisplayToast("List Directory",FileName);
}
// SubFolders (If you want to include sub-folders, un-comment (lol, english ?) these lines :
//var f2=new Enumerator(f.subfolders);
//for (; !f2.atEnd(); f2.moveNext()) {
// ListDirectory(f2.item());
//}
}
//...............
I'd like to explain to you how this function works, but that's very hard, I can't find the words to say that...