Have you included the code of function
GetListOfFiles at top of the script. Without copying the code of this function into my script you get an error message because of unknown symbol
GetListOfFiles. Important is that you copy just the function code, without all the additional code below the function for demonstrating the usage of this function. You have to copy only from line
function GetListOfFiles (nFileList, sDirectory, sFileType, bSubDirs) {to line
} // End of function GetListOfFilesAnother, perhaps better possibility to include the function is to make a copy of the downloaded script file (for example as GetListOfFilesFunc.js) , open the copy, remove the code for demonstrating usage and save the script file now containing only the function itself. (The comment lines could be also removed to make script execution a little bit faster.) The function can now be included into the main script file with the line:
// include C:\full path\to external\script\GetListOfFilesFunc.jsThe 4th parameter
bSubDirs of
GetListOfFiles is optional. Javascript supports optional parameters. It is used with value
false if not used on call. Of course you can add
,false to call of
GetListOfFiles.
Is your script an ASCII/ANSI DOS file as indicated with just
DOS in the status bar at bottom of the UltraEdit window with the opened script file active? If you see for example U-DOS or U8-DOS, your script file is encoded with UTF-8 or UTF-16 which are both not supported by the script interpreter.
BTW: What is the error displayed in the output window? You can copy content of output window via context menu (right click into output window).