If you are using English UltraEdit and have not modified the
Find Output Format configuration settings, you can
- download GetListOfFiles.js,
- open this UltraEdit script in UltraEdit,
- replace the last line in this file by
- Code: Select all
if (GetListOfFiles(nSearchIn,sFolder,sFiles,bSubFolders)) {
UltraEdit.activeDocument.selectAll();
var asFileNames = UltraEdit.activeDocument.selection.split("\r\n");
asFileNames.pop(); // Remove empty string at end of array of file names.
UltraEdit.closeFile(UltraEdit.activeDocument.path,2);
UltraEdit.outputWindow.write("\nFound "+asFileNames.length+"file"+((asFileNames.length != 1) ? "s:\n" : ":\n"));
for (nFile = 0; nFile < asFileNames.length; nFile++) {
UltraEdit.open(asFileNames[nFile]);
UltraEdit.activeDocument.xmlConvertToCRLF();
UltraEdit.closeFile(UltraEdit.activeDocument.path,1);
UltraEdit.outputWindow.write(asFileNames[nFile]);
}
}
- save the script file,
- execute it using Scripting - Run Active Script and
- enter the data for getting the list of XML file names to open, convert, save and close.
You need to adapt 2 string variables according to comments at top of the script if you are using UltraEdit in a different language or with having
Find Summary definition string changed or disabled.
Note: None of the XML files to convert should be opened already in UltraEdit as this would result in failing of the script.