Hi, I have a test file with file names and paths. It is used to search a directory, find then open the file, run a script inside the file, close it and move on to the next line in the test file. I've got one bug I'm not sure how to handle. If the file is not found in the directory to open I get UEs error dialog box stating so. Then the whole application crashes after acknowledging the error.
Here is the line of code to open the file. Can someone help me with the right if statement to just note the file was not found and continue?
Thanks,
Max
Here is the line of code to open the file. Can someone help me with the right if statement to just note the file was not found and continue?
Code: Select all
if (nXmlFile < UltraEdit.document.length){
UltraEdit.document[nXmlFile].setActive();
} else { UltraEdit.open(sFileName);
Max