It is not possible to search for a string at end of file with any regular expression engine supported by UltraEdit. There is no "end of file" anchor supported. Therefore you can't use a simple replace in files command to remove the last line termination, except the last line in all files contains always the same string not existing anywhere else in the file like </html> for HTML files.
It would be possible to use a script or a macro to open all files within a folder, go to end of each file, delete the last line termination in each file and save the files.
For example you call UltraEdit with a shortcut having following command line:
"Path to UltraEdit program files folder\uedit32.exe" /fni "Path to folder with the files to modify\*.*" /M,E="path to macro file\DeleteLastLineTerm.mac"The macro file
DeleteLastLineTerm.mac contains just 1 macro with following code:
- Code: Select all
Loop 0
IfNameIs ""
ExitLoop
EndIf
Bottom
Key BACKSPACE
CloseFile Save
EndLoop
But a macro using Replace In Files would be much faster when all files end always with the same string because opening lots of files makes the macro solution very slow in comparison to usage of a macro with just command
ReplInFiles.