I want to write a script to open many jsl files in a folder. In each jsl file, I need to find a text and replace it with another text. Save each file and close it before going onto the next file in the folder. I tried to use "substitute" but did not work. Appreciate all the help!
//folder contains 224 jsl scripts
folderID = "T:\JMP_SCRIPTS\Openfiles n update\test\";
Files = Files In Directory(FolderID);
For(i = 1, i <= N Items(Files), i++,
FileID = Files[i];
//Open jsl file
openFile = Open(folderID || FileID);
subdt = Substitute(openFile, "99@wefghynKm0r3", "hihi");
openFile << Save(folderID || FileID);
Close(openFile, No Save);
);// End FOR loop