If you have windows, then you could try this piece of unadulterated evil
Save as ListFiles.wsf and put in the dir you want to list files for....
Run it and it should create FileListing.txt..
I have used with folder of 2000+ files and it seems to cope...even thoug it is slower than using C++ :0
Code:
<PACKAGE>
<JOB>
<SCRIPT LANGUAGE="JScript">
//
// RobJFord 22/6/02
// List Files in Currect Folder
//
// Get File system
try{
var oFS = new ActiveXObject("Scripting.FileSystemObject");
}
catch(e){
WScript.Echo("Could not create file system interface");
WScript.Quit(1);
}
// Get Dir & Files
try{
var oThisScript = oFS.GetFile(WScript.ScriptFullName);
var oCurrDir = oThisScript.ParentFolder;
oThisScript = "";
var oFileCol = new Enumerator(oCurrDir.files);
}
catch(e){
WScript.Echo("Could not enumerate files");
WScript.Quit(1);
}
// Create output file and list
try{
var oOutputFile = oFS.OpenTextFile
(oCurrDir + "\\FileListing.txt",2,"TRUE");
oOutputFile.WriteLine("Listing of " + oCurrDir);
oOutputFile.WriteLine(oCurrDir.files.Count + " Files");
for (;!oFileCol.atEnd();oFileCol.moveNext()){
oOutputFile.WriteLine(oFileCol.item());
}
WScript.Echo("List Made");
oOutputFile.Close();
}
catch(e){
WScript.Echo("Could not list files");
WScript.Quit(1);
}
oOutputFile = "";
oFS = "";
oFileCol = "";
</SCRIPT>
</JOB>
</PACKAGE>