Multiple rename in editor shortcut

English support forum

Moderators: Stefan2, white, Hacker

Post Reply
jackhab
Junior Member
Junior Member
Posts: 32
Joined: 2008-03-05, 09:36 UTC

Multiple rename in editor shortcut

Post by *jackhab »

Multiple rename dialog allows editing file names directly in a text editor.

Is there a way to launch the editor with the selected files directly, bypassing Multiple Rename dialog?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 5459
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Multiple rename in editor shortcut

Post by *Horst.Epp »

For one selected file you have the context menu entry "Edit left" or "Edit right" (f4 / Shift-f4).
Windows 11 Home x64 Version 22H2 (OS Build 22621.1194)
TC 10.52 x64 / x86
Everything 1.5.0.1336a (x64)
jackhab
Junior Member
Junior Member
Posts: 32
Joined: 2008-03-05, 09:36 UTC

Re: Multiple rename in editor shortcut

Post by *jackhab »

Horst.Epp wrote: 2022-12-04, 10:37 UTC For one selected file you have the context menu entry "Edit left" or "Edit right" (f4 / Shift-f4).
Hi Horst.Epp
I was asking about renaming multiple files in editor, not editing file contents. Unless I misunderstood your answer and I can rename files via F4.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 5459
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Multiple rename in editor shortcut

Post by *Horst.Epp »

The MRT dialog supports editing the names in an external editor
and use the edited list to rename the files.
Without the MRT you would need a TC function to rename files with a similar function.
There is no such function and I don't see a real need for it
but you may add a suggestion in the sub-forum.
Windows 11 Home x64 Version 22H2 (OS Build 22621.1194)
TC 10.52 x64 / x86
Everything 1.5.0.1336a (x64)
User avatar
petermad
Power Member
Power Member
Posts: 12321
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Multiple rename in editor shortcut

Post by *petermad »

2jackhab
Is there a way to launch the editor with the selected files directly, bypassing Multiple Rename dialog?
Since the file names are stored in a file you can just open that file with F4.

Is your question perhaps: Can I transfer the file names selected in the file panel automatically to a file? - Yes, you can either use the command:

SAVESELECTION path\filename
or
cm_SaveSelectionToFile

Both can be used in a button.
License #524 (1994)
Danish Total Commander Translator
TC 10.52 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.4.1.1022 (x64)
TC 3.41 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Horst.Epp
Power Member
Power Member
Posts: 5459
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Multiple rename in editor shortcut

Post by *Horst.Epp »

petermad wrote: 2022-12-04, 13:19 UTC 2jackhab
Is there a way to launch the editor with the selected files directly, bypassing Multiple Rename dialog?
Since the file names are stored in a file you can just open that file with F4.

Is your question perhaps: Can I transfer the file names selected in the file panel automatically to a file? - Yes, you can either use the command:

SAVESELECTION path\filename
or
cm_SaveSelectionToFile

Both can be used in a button.
But this would still not rename the files after editing the list as its done in MRT.
Windows 11 Home x64 Version 22H2 (OS Build 22621.1194)
TC 10.52 x64 / x86
Everything 1.5.0.1336a (x64)
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 2854
Joined: 2003-05-06, 11:46 UTC

Re: Multiple rename in editor shortcut

Post by *Sir_SiLvA »

petermad wrote: 2022-12-04, 13:19 UTC Is your question perhaps: Can I transfer the file names selected in the file panel automatically to a file? - Yes, you can either use the command:
no his questions was clearly:
instead of "select x files, press ctrl+m, Mousclick the button which looks like a folder instead of an editor, choose Edit names, Edit the names"
jackhab wants to "select x files -> press a buton -> Edit the names".
User avatar
petermad
Power Member
Power Member
Posts: 12321
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Multiple rename in editor shortcut

Post by *petermad »

But this would still not rename the files after editing the list as its done in MRT.
Sure, but jackhab can prepare the file before opening the Multi Rename Tool. But still - I am not sure what jackhab really wants.
License #524 (1994)
Danish Total Commander Translator
TC 10.52 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.4.1.1022 (x64)
TC 3.41 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 12321
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Multiple rename in editor shortcut

Post by *petermad »

Put these entries in your usercmd.ini file (located the same place as your wincmd.ini file, if not present create it)

Code: Select all

[em_copy_MRT_names]
cmd=SAVESELECTION %COMMANDER_INI%\..\MRT-names.txt

[em_open_MRT_names]
cmd=%COMMANDER_INI%\..\MRT-names.txt
Make this button:

Code: Select all

TOTALCMD#BAR#DATA
em_copy_MRT_names,em_open_MRT_names

wcmicons.dll,46
Copy selected files to MRT-names.txt and open the file
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
Now you can select some files, click the button, and the filenames is saved to the files MRT-names.txt in your TC Data folder and opened in the default editor for txt files.
License #524 (1994)
Danish Total Commander Translator
TC 10.52 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.4.1.1022 (x64)
TC 3.41 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 12644
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Multiple rename in editor shortcut

Post by *Hacker »

jackhab,
This might or might not be what the request is about. Copy, then right click the Button Bar and Paste.

Code: Select all

TOTALCMD#BAR#DATA
notepad.exe
%L
%COMMANDER_PATH%\WCMICON2.DLL,28



-1
PTH
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
petermad
Power Member
Power Member
Posts: 12321
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Multiple rename in editor shortcut

Post by *petermad »

Hacker wrote: 2022-12-04, 20:28 UTC jackhab,
This might or might not be what the request is about. Copy, then right click the Button Bar and Paste.

Code: Select all

TOTALCMD#BAR#DATA
notepad.exe
%L
%COMMANDER_PATH%\WCMICON2.DLL,28



-1
For this solution, may I suggest using %WF instead of %L to exclude the paths and support Unicode names:

Code: Select all

TOTALCMD#BAR#DATA
notepad.exe
%WF
%COMMANDER_PATH%\WCMICON2.DLL,28
Pass selected filenames to Notepad (without path)


-1
Notice that you have to use "Save as" in Notepad - otherwise you end up with a file with an obscure random name in the %TEMP% directory.
License #524 (1994)
Danish Total Commander Translator
TC 10.52 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.4.1.1022 (x64)
TC 3.41 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 12644
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Multiple rename in editor shortcut

Post by *Hacker »

petermad,
may I suggest using %WF instead of %L to exclude the paths and support Unicode names
Indeed, sure ;)

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.
jackhab
Junior Member
Junior Member
Posts: 32
Joined: 2008-03-05, 09:36 UTC

Re: Multiple rename in editor shortcut

Post by *jackhab »

Thanks, petermad
The idea with the file list button looks nice, maybe I'll hook up some Autokey trick to rename files via this file list which bypasses MRT.
Fla$her
Power Member
Power Member
Posts: 791
Joined: 2020-01-18, 04:03 UTC

Re: Multiple rename in editor shortcut

Post by *Fla$her »

2jackhab
In my practice, there were a lot of auto-naming buttons/scripts. The question is only about the specific replacement data and the simplicity/complexity of the implementation.
User avatar
petermad
Power Member
Power Member
Posts: 12321
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Multiple rename in editor shortcut

Post by *petermad »

2jackhab
maybe I'll hook up some Autokey trick to rename files via this file list which bypasses MRT.
You can load and run MRT automatically with a saved setting with the command:

Code: Select all

MULTIRENAME==<saved setting name>
License #524 (1994)
Danish Total Commander Translator
TC 10.52 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.4.1.1022 (x64)
TC 3.41 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply