Multiple rename in editor shortcut

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
jackhab
Junior Member
Junior Member
Posts: 35
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: 6480
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 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
jackhab
Junior Member
Junior Member
Posts: 35
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: 6480
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 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14793
Joined: 2003-02-05, 20:24 UTC
Location: 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 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
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 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3291
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".
Hoecker sie sind raus!
User avatar
petermad
Power Member
Power Member
Posts: 14793
Joined: 2003-02-05, 20:24 UTC
Location: 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 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14793
Joined: 2003-02-05, 20:24 UTC
Location: 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 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13064
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: 14793
Joined: 2003-02-05, 20:24 UTC
Location: 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 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13064
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: 35
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: 2296
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.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14793
Joined: 2003-02-05, 20:24 UTC
Location: 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 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply