Multi-Rename Tool with find/change list

Here you can propose new features, make suggestions etc.

Moderators: Hacker, Stefan2, white

Post Reply
PrzemekRyk
Junior Member
Junior Member
Posts: 3
Joined: 2019-02-26, 15:32 UTC

Multi-Rename Tool with find/change list

Post by *PrzemekRyk »

Hi All,

I'm wondering if it would be possible to add a bit of functionality to Multi-Rename Tool. I really often repeat some operations and it would be really great if I would be able to define them once, and then wait till Total Commander finish doing them one by one. Something similiar to Actions in Photoshop.

For example: I've got files with such filenames:
Youre.the.Worst.S02E01.The.Sweater.People.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E02.Crevasses.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E03.Born.Dead.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E04.All.About.That.Paper.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E05.We.Can.Do.Better.Than.This.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E06.Side.Bitch.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E07.There.Is.Not.Currently.a.Problem.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E08.Spooky.Sunday.Funday.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E09.LCD.Soundsystem.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E10.A.Right.Proper.Story.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E11.A.Rapidly.Mutating.Virus.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E12.Other.Things.You.Could.Be.Doing.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv
Youre.the.Worst.S02E13.The.Heart.Is.a.Dumb.Dumb.1080p.AMZN.WEB-DL.DDP5.1.H.264-SiGMA.mkv

I'm using mostly "Search & Replace" to run following operations on file names (Search for | Replace with, and <space> means pressing space on keyboard, <refresh> means pressing F5 on keyboard and refreshing file list):
. | <space>
<refresh>
Youre the Worst s01e | 01x
<refresh>
01x?? | 01x?? - You're the Worst -
<refresh>
<space>1080* | .mkv

The result in file names is:
01x01 - You're the Worst - Pilot.mkv
01x02 - You're the Worst - Insouciance.mkv
01x03 - You're the Worst - Keys Open Doors.mkv
01x04 - You're the Worst - What Normal People Do.mkv
01x05 - You're the Worst - Sunday Funday.mkv
01x06 - You're the Worst - PTSD.mkv
01x07 - You're the Worst - Equally Dead Inside.mkv
01x08 - You're the Worst - Finish Your Milk.mkv
01x09 - You're the Worst - Constant Horror and Bone-Deep Dissatisfaction.mkv
01x10 - You're the Worst - Fists and Feet and Stuff.mkv

So - I've got four operations. I have to do it step by step manually. But it would be much nicer and faster, if I could just load find & replace list from TXT file and let Total Commander do the rest. All by itself. With a capability to use regexp? Of course.

What do you think about it?

Regards,
PrzemekRyk
User avatar
HolgerK
Power Member
Power Member
Posts: 5364
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Multi-Rename Tool with find/change list

Post by *HolgerK »

Only two operations needed (wich can be saved and recalled with "<F2> Load/save Settings")

-----
Search for:

Code: Select all

.
Replace with:<space-->

Code: Select all

 
[_] [E]xtension [_] Regex

Save as: "ReplaceDots"
-----
Search for:

Code: Select all

(.*)\WS(\d\d)E(\d\d)\W(.*)\W1080(.*)
Replace with:

Code: Select all

$2x$3 - $1 - $4
[_] [E]xtension [X] Regex

Save as: "ReorderTitle"
-----

1. <F2>Load: "ReplaceDots"
2. Start & refresh
3. <F2>Load: "ReorderTitle"
4. Start & done

HTH
Holger
Make our planet great again
PrzemekRyk
Junior Member
Junior Member
Posts: 3
Joined: 2019-02-26, 15:32 UTC

Re: Multi-Rename Tool with find/change list

Post by *PrzemekRyk »

Well. First part gone well. Second part - well, the effect is:
01x01 - Youre the Worst - Pilot
01x02 - Youre the Worst - Insouciance
01x03 - Youre the Worst - Keys Open Doors
01x04 - Youre the Worst - What Normal People Do
01x05 - Youre the Worst - Sunday Funday
01x06 - Youre the Worst - PTSD
01x07 - Youre the Worst - Equally Dead Inside
01x08 - Youre the Worst - Finish Your Milk
01x09 - Youre the Worst - Constant Horror and Bone-Deep Dissatisfaction
01x10 - Youre the Worst - Fists and Feet and Stuff

I'm not regexp guru, but it's not the point. Here we're talking about to operations. It would be nice, if it would be possible to put them in one list, executed step by step. :)
User avatar
HolgerK
Power Member
Power Member
Posts: 5364
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Multi-Rename Tool with find/change list

Post by *HolgerK »

PrzemekRyk wrote: 2019-02-27, 11:42 UTC Second part - well, the effect is:..
Well, this looks like you've forgotten to uncheck the replace in extensions:
<F1> help wrote:[E] Also replace the search text within the extension.
Rules for the case that this option is not checked:
1. When using the rename mask, only the part in "File name" will be modified by search+replace.
2. When loading the names from an external text file, the part starting with the last dot will not be modified.
Example: To replace all dots in the file name except for the one separating name and extension, uncheck this box.
Here we're talking about to operations. It would be nice, if it would be possible to put them in one list, executed step by step.
Two half automated steps reducing the effort of entering several different text strings are better than the four steps you started with.

Regards
Holger
Make our planet great again
User avatar
Hacker
Moderator
Moderator
Posts: 12380
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Multi-Rename Tool with find/change list

Post by *Hacker »

PrzemekRyk,
I really like how your season 2 files get automatically renamed into season 1 files :D
Anyways, for such multiple-step rename operations I'd suggest ReNamer with a preset like this .RNP file:

Code: Select all

[Rule0]
ID=Replace
Config=TEXTWHAT:%2E;TEXTWITH:+;WHICH:3;SKIPEXTENSION:1;CASESENSITIVE:0;USEWILDCARDS:0;WHOLEWORDSONLY:0
Marked=1
Comment=

[Rule1]
ID=Replace
Config=TEXTWHAT:Youre+the+Worst+s02e;TEXTWITH:02x;WHICH:3;SKIPEXTENSION:1;CASESENSITIVE:0;USEWILDCARDS:0;WHOLEWORDSONLY:0
Marked=1
Comment=

[Rule2]
ID=Replace
Config=TEXTWHAT:+;TEXTWITH:+%2D+You%27re+the+Worst+%2D+;WHICH:1;SKIPEXTENSION:1;CASESENSITIVE:0;USEWILDCARDS:0;WHOLEWORDSONLY:0
Marked=1
Comment=

[Rule3]
ID=Remove
Config=TEXT:+1080%2A;WHICH:3;SKIPEXTENSION:1;CASESENSITIVE:0;USEWILDCARDS:1;WHOLEWORDSONLY:0
Marked=1
Comment=
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
PrzemekRyk
Junior Member
Junior Member
Posts: 3
Joined: 2019-02-26, 15:32 UTC

Re: Multi-Rename Tool with find/change list

Post by *PrzemekRyk »

Hacker

Well - I thought, that it would be nice to have that kind of tool in Total Commander (find and change by list). :) That's why I wrote my suggestion. :)
User avatar
Hacker
Moderator
Moderator
Posts: 12380
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Multi-Rename Tool with find/change list

Post by *Hacker »

PrzemekRyk,
Oh, indeed. Well, your suggestion has my support.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Stefan2
Power Member
Power Member
Posts: 3557
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Multi-Rename Tool with find/change list

Post by *Stefan2 »

Support++

Till then maybe use a script in between:


Usage:
- Save the (dummy!) code in TC folder as "_ForEachSelFileDo_RenameInList.vbs"

Code: Select all

 VBS, AHK or Powershell
 
Read TCs-%F file
   For Each Line
        strLine = replace( strLine, "strSearchFor" , "strReplaceWith")
        strLine = replace( strLine, "strSearchFor" , "strReplaceWith")
        out=out+strLine+CRLF 
   Next Line
WriteTextfile  out > strResultfile
  
 
(((just ask if you would need a working script)))



- Create button in TC:

TC Button
Command: "D:\rive\path to\TotalCmd\Scrips\this.vbs" or best "%Commander_Path%\Scripts\this.vbs"
Parameter: "%F"
(Use the quotes as shown too for both cmd and param!)
In button dialog press F1-key to read more: %L, %l, %F, %f, %D, %d, %WL, %WF, %UL, %UF create a list file with the names of the selected files and directories,...

Startpath: <empty>
Icon: e.g. Script.exe -or- WCMICONS.DLL
Tooltip: e.g.: _ForEachSelFileDo_


- For each renaming, adjust the script


- - Select a few files and press the button
- - The script work and create a result file strResultfile in same folder

- - - Next select the files again and open MultiRenameTool
- - - In MRT use "Load names from file" (see [Help]-button) and select the strResultfile


- Inspect the New Name list if everything is fine....
- Rename
Done




 
jjk
Member
Member
Posts: 181
Joined: 2003-07-03, 10:41 UTC

Re: Multi-Rename Tool with find/change list

Post by *jjk »

Support ++ also.
jjk
Member
Member
Posts: 181
Joined: 2003-07-03, 10:41 UTC

Re: Multi-Rename Tool with find/change list

Post by *jjk »

I just discovered that MultiCommander has that feature as a built-in renamer extension, and more : one can save/restore sets of search/replace.
But, I want just have it in TC :)
hi5
Senior Member
Senior Member
Posts: 307
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Multi-Rename Tool with find/change list

Post by *hi5 »

+1
F4MiniMenu - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey) - TC Forum thread. TCSyncComments (copy file comments) - Vote: Date/Time poll
jjk
Member
Member
Posts: 181
Joined: 2003-07-03, 10:41 UTC

Re: Multi-Rename Tool with find/change list

Post by *jjk »

Also Advanced Renamer has that feature, but it is not integrated in TC :)
Post Reply