So, to wrap things up here is a summary of the steps to remove trailing spaces from files/folders:
Plugin Installation For LuaFAR Search:
1. go to
https://plugring.farmanager.com/plugin.php?pid=858&l=en
2. Download either x86 or x64 version - it must match your Far Manager bitness
P.S. Do not jump from this page to Github, use one of the "Download" buttons from this page only
3. go to your Far Manager installation location, (example: C:\Users\UserName\AppData\Local\Far Manager x64\Plugins) enter Plugins folder, make a subfolder called "LuafarSearch" and unpack the plugin archive into this folder. Then restart Far Manager. Make sure the plugin's bitness matches FarManager bitness (either x86 or x64).
Search and Replace using LuaFAR Search
1. Be careful with automatic renaming - it is easy to get it wrong.
2. Using LuaFAR Search plugin: press F11, select LuaFar Search, select Rename,
Code: Select all
╔════════════════════════════ LF Rename ═════════════════════════════╗
║ File mask: * ↓║
║ (•) Search in all [x] Rename files ║
║ ( ) Search in selected [x] Rename folders ║
║ [x] Process subfolders ║
╟────────────────────────────────────────────────────────────────────╢
║ Search for: ║
║ \s+$ ↓║
║ Replace with: ║
║ ↓║
║ [ ] Function mode [x] Confirm renaming ║
║ [x] Log file ║
Alternate Methods:
1. There are several plugins for files/directory renaming. You can find them by searching on this
https://forum.farmanager.com/ and
https://plugring.farmanager.com/.
2. Press AltF7
Search for: /.+\s$/
After the search is complete, press [ Panel ] button to move all results to a temporary panel to "delete/correct" or do whatever you need
3. Alternate plugin to try: Visual Rename. It can rename files by RegExp too
https://plugring.farmanager.com/
Thanks to all who positively contributed to this discussion and resolution: Shmuel, Yegor, buniak_a_h, pepak, RegexNinja