Multiple expressions in Multi-Rename Tool

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
gewone
Junior Member
Junior Member
Posts: 66
Joined: 2008-03-06, 17:37 UTC

Multiple expressions in Multi-Rename Tool

Post by *gewone »

Hi dear developers!

I'm not sure if this has even been up before, but anyways, just out of curiosity, would it be possible to make the "Search & Replace" section in our beloved CTRL+M (Multi Rename Tool) to allow more than one expression? Say I want to replace "a" with "b" and "x" with "y", respectively. Right now I use the tool two times in a row, one with each string.

I tried using the first non-accepted-in-filenames-anyways-character that I could think of for a "delimiter", namely the semicolon, so I wrote "a;x" in the Search for field and "b;y" in the Replace field with field, and held my fingers crossed. Nah, it didn't work. In most cases, I guess I could make a pretty complex RegEx line for a one-click chain, but say for simple renaming procedures not even involving regular expressions, wouldn't it be pretty neat if you could chain it kind of the way I suggested?

Assuming it wouldn't somehow "nestle" the renaming process (and therefor not is featured) I'm guessing the implementation would be fairly easy?

Cheers!
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Multiple expressions in Multi-Rename Tool

Post by *Stefan2 »

- open MRT
- press F1
- read
Search & Replace
The string entered in the field 'Search for' ... . . . . .
. . . .
.. .. . .
You can search+replace multiple strings in one step! The strings need to be separated by the vertical line (Alt+124).
Example: Replace Umlauts+Accents:
Search for: ä|ö|ü|é|è|ê|à
Replace with: ae|oe|ue|e|e|e|a
Works only for plain text, so don't enable RegEx!


That :?:     :D
 
User avatar
gewone
Junior Member
Junior Member
Posts: 66
Joined: 2008-03-06, 17:37 UTC

Re: Multiple expressions in Multi-Rename Tool

Post by *gewone »

Hahahaha EXACTLY what I was looking for the whole time! :D

Funny by the way, in my attempts, since semicolon didn't work, I thought "Hmm, this seemingly basic feature SHOULD already be in TC, so what could the dividing character be if not semicolon..." and the next time that came to my head was the vertical line, so I actually tried it, but it still didn't work.

As it turned out, my last MRT task was a RegEx one, so I had the RegEx checkbox selected (I rarely uncheck it, since it mostly doesn't collide with / mess up basic Search & Replace jobs), which of course makes the "|" be interpreted in the wrong way, and this was why it didn't work.

Thanks anyways, much appreciated!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Multiple expressions in Multi-Rename Tool

Post by *ghisler(Author) »

Semicolons aren't used here because they are valid characters for file names. The pipe symbol | cannot appear in file names, so it's used to separate multiple options.
Author of Total Commander
https://www.ghisler.com
Post Reply