Bulk Correct Files/Folders with incorrect names (e.g. with trailing spaces)

You have encountered a problem using Far Manager? Here you can get help.
CliffyBoy
Posts: 14
Joined: Fri 01 May, 2020 14:29
Been thanked: 1 time

Bulk Correct Files/Folders with incorrect names (e.g. with trailing spaces)

Post by CliffyBoy »

Hello,

I have searched the internet for something to fix files/folders with illegal characters (trailing spaces) in Windows 10. Someone mentioned this program so I downloaded and gave it a try. I have been able to delete/correct a single file, but can someone provide exact direction to delete/correct multiple files simultaneously if this is possible? I'd like to do a recursive scan of a Main directory E:/ and find then correct any trailing space files/folders found. Any assistance provided would be appreciated.

Thanks
Last edited by HaRT on Sun 03 May, 2020 00:44, edited 1 time in total.
Reason: Generalized Topic Title
Shmuel
Posts: 6820
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 528 times

Bulk Correct Files/Folders with trailing spaces

Post by Shmuel »

There are several plugins for files/directories renaming. You can find them by searching on this forum and plugring.
Personally I'm using LuaFAR Search (but other plugins may be even better for renaming).
Be careful with automatic renaming - it is easy to get it wrong.
Yegor
Posts: 1326
Joined: Mon 04 Apr, 2005 13:41
Location: San Ramon, CA / Kharkov, UA
Has thanked: 32 times
Been thanked: 61 times

Bulk Correct Files/Folders with trailing spaces

Post by Yegor »

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.
Last edited by Yegor on Fri 01 May, 2020 19:41, edited 4 times in total.
Мы не можем ждать милостей от Фара, взять их у него — наша задача! (C) Мичурин
CliffyBoy
Posts: 14
Joined: Fri 01 May, 2020 14:29
Been thanked: 1 time

Bulk Correct Files/Folders with trailing spaces

Post by CliffyBoy »

I appreciate your responses but they didnt get at the heart of my question. Right now without plugins i can rename singular files/folders with illegal characters (trailing spaces) in Windows. What i need to know is if I can do this with the program as is in bulk. I didnt see this specifically in the help file. Also I looked at the LuaFar Search entry but it does not specify whether or not it can do this. I am new to this program and would rather not keep installing things for it that will not help me with my task. The Search and Replace plugin says it can handle multiple files at once but does anyone know if it will take care of many illegal files/folders at once.

Thanks
CliffyBoy
Posts: 14
Joined: Fri 01 May, 2020 14:29
Been thanked: 1 time

Bulk Correct Files/Folders with trailing spaces

Post by CliffyBoy »

Yegor,

My screen just updated and I now see your response. I will try your suggestion. Thanks
Shmuel
Posts: 6820
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 528 times

Bulk Correct Files/Folders with trailing spaces

Post by Shmuel »

I would not mention LuaFAR Search if I knew it couldn't do that.

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                                                     ║
Last edited by Shmuel on Fri 01 May, 2020 20:18, edited 1 time in total.
CliffyBoy
Posts: 14
Joined: Fri 01 May, 2020 14:29
Been thanked: 1 time

Bulk Correct Files/Folders with trailing spaces

Post by CliffyBoy »

Yegor,
I successfully located, moved to temp, and hightlighted my target files/folders. I'm having difficulty with the rename. What I'd like to do is rename all the files/folders to overwrite the existing ones with the same name minus the trailing space. I tried a few times but I seem to be missing something. Can you add more details how to accomplish this?


Shmuel,

Thanks for clarifying about LuaFar Search. When I complete this using Yegor's method, I will practice another batch using LuaFAR Search. I am new to this program so learning how to navigate different ways is helping me tremendously.

Thanks
User avatar
buniak_a_h
Posts: 4236
Joined: Sat 20 Apr, 2013 00:17
Location: Санкт-Петробад
Has thanked: 222 times
Been thanked: 643 times
Contact:

Bulk Correct Files/Folders with trailing spaces

Post by buniak_a_h »

CliffyBoy, try also plugin Visual rename. It can rename files by RegExp too
Last edited by buniak_a_h on Fri 01 May, 2020 22:50, edited 1 time in total.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Bulk Correct Files/Folders with trailing spaces

Post by pepak »

CliffyBoy wrote: Fri 01 May, 2020 20:44 I successfully located, moved to temp, and hightlighted my target files/folders. I'm having difficulty with the rename. What I'd like to do is rename all the files/folders to overwrite the existing ones with the same name minus the trailing space. I tried a few times but I seem to be missing something. Can you add more details how to accomplish this?
SHIFT+F6 rather than a simple F6?
CliffyBoy
Posts: 14
Joined: Fri 01 May, 2020 14:29
Been thanked: 1 time

Bulk Correct Files/Folders with trailing spaces

Post by CliffyBoy »

Hello,

I'm still stuck in the mud. Yegor has not commented again to complete this with his method. I then installed LuaFar Search but I can not get to the window displayed above in Shmuel's post. I do see Luafar Search in the AppData\Local\Far Manager x64\Plugins folder but pressing shift F1 brings up a different dialog. Shift F2 does nothing. Maybe the plugin is not installed correctly? The general help file does not provide enough direct info to walk me through this. Can anyone assist further with this?
User avatar
buniak_a_h
Posts: 4236
Joined: Sat 20 Apr, 2013 00:17
Location: Санкт-Петробад
Has thanked: 222 times
Been thanked: 643 times
Contact:

Bulk Correct Files/Folders with trailing spaces

Post by buniak_a_h »

CliffyBoy, you must see LuaFAR Search in plugin list (F11). Сhoose it, than choose "Rename".
CliffyBoy
Posts: 14
Joined: Fri 01 May, 2020 14:29
Been thanked: 1 time

Bulk Correct Files/Folders with trailing spaces

Post by CliffyBoy »

In response to Pepak, Shift F6 did not work either. Im expecting to see the Search Replace dialog but nothing happens. I presss F11 and the only plugin commands are for
Advanced Compare
ArcLite
Case Conversion
EMenu
Macro Browser
Netbox
Netbox Commands
Network Browser
Process List
Same Folder
Temporary panel

So far I spent 1 minute doing the initial search that locates the problem files, and almost 24hrs trying to figure out what to do next.
CliffyBoy
Posts: 14
Joined: Fri 01 May, 2020 14:29
Been thanked: 1 time

Bulk Correct Files/Folders with trailing spaces

Post by CliffyBoy »

buniak_a_h,

Thanks for replying. What must be happening is the plugin wasnt installed correctly. Can you spell out the exact process to install and I will redo it.
Shmuel
Posts: 6820
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 528 times

Bulk Correct Files/Folders with trailing spaces

Post by Shmuel »

CliffyBoy, go to your Far Manager installation, enter Plugins folder, make there a subfolder "LuaFAR search" (the exact name does not matter) and unpack the plugin archive into this folder. Then restart Far Manager. Make sure the plugin's bitness match Far bitness (either x86 or x64).
CliffyBoy
Posts: 14
Joined: Fri 01 May, 2020 14:29
Been thanked: 1 time

Bulk Correct Files/Folders with trailing spaces

Post by CliffyBoy »

Shmuel,

My install path is C:\Users\A1\AppData\Local\Far Manager x64\Plugins, and my folder is named LuafarSearch. I got the plugin from https://github.com/shmuz/far_plugins/re ... lygon-v0.1, and used the source code zip. I dont see anything indicating whether this is x64 or x86. Is this the correct location to get the plugin from? How would I check the bitness factor?
Post Reply

Return to “Support and Troubleshooting”