Hi,
I'm trying to write a script to get files in a folder using JScript in Toad Data Modeler. I googled lots, but there are a bunch of incompatible references for JScript.
var Fs = new ActiveXObject("Scripting.FileSystemObject");
var Folder = Fs.GetFolder(Path);
for( i = 1; i < Folder.Files.Count; i++) {
var file = Folder.Files.Item(i); // This does not work, although it should.
var file2 = Folder.Files[i]; // This does not work, because it is a collection, not an array.
}
I need help for:
- How to get files in a folder?
- Where to get a complete reference for JScript used in Toad Data Modeler?
Kind Regards,