Want to copy original filename in Multi-Rename tool

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *sa16 »

2yahuu
In your example of 3 files, what will be the original filename?
Is "Result list" (in MRT) suitable for you, together with [X]?
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Want to copy original filename in Multi-Rename tool

Post by *white »

yahuu wrote: 2023-11-14, 05:18 UTC Only a certain file name can be modified in the editor (of course this can also be done via column mode, but this adds complexity). My requirement is all files. I need to copy the name of one of them and rename all files.
My solution was not by using column mode, but by merging the 3 filenames into one line with a simple key press (Ctrl+J).
yahuu wrote: 2023-11-14, 05:18 UTC If there are three files, I want to rename them all to the name of one of the files. It's name is 20+ characters long and I don't want to type it with a keyboard or worry about making typos, I just copy the name and paste it into the filename text box.
It seems you don't understand the step-by-step instructions I listed.
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Want to copy original filename in Multi-Rename tool

Post by *hi5 »

yahuu wrote: 2023-11-14, 05:25 UTCBut the rules are different every time I enter a new name. It may be that only one old name is used, or it may be a combination of multiple ones.
I think you may have missed the point. Before you start the MRT (with a saved search or without) you COPY the file names you want to use (this could be one, five or ... whatever number) - the [X] simply uses the clipboard so it uses the one, five or ... whatever number in the NAME field. That is what you want (at least that is how I understand it).
yahuu wrote: 2023-11-14, 05:25 UTCSAVEDSEARCH makes no sense to me.
I beg to differ, because - see above - you copy the file names you want to use before you call the MRT. If you use = you can check what the Results will be, if you use == it will be done automatically and if there are no errors you're done.

With the = you can preview the results, and if you're not happy with the results just yet, you can as White describes, Edit names in your preferred text editor.

The above works as it is consistent. If you really want to do something else each time, no setting in MRT is going to help you of course because there is just no way to address each specific scenario for all users all the time.

Work with what CAN be done and use it, that might mean you may have to live with some inconsistencies or slightly modify your work method.

Alternative is to pass on the file names to a program/script you develop yourself that CAN address your specific needs. String (file name) manipulation in AutoHotkey is quite easy for example, but this can also be done in batch files, powershell, perhaps a third party file renamer ( portable freeware programs here https://www.portablefreeware.com/index.php?sc=45 - can't say I tried any of them but some of them have other options compared to MRT (just looking at the screenshots)).

Hope this is useful.

Edit: you should/need to assign the cm_CopyNamesToClip command to a hotkey so you can easy copy them of course, so select one, five, whatever number and press say F12 and now you have the file names in the clipboard.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *yahuu »

white wrote: 2023-11-14, 08:25 UTC
yahuu wrote: 2023-11-14, 05:18 UTC Only a certain file name can be modified in the editor (of course this can also be done via column mode, but this adds complexity). My requirement is all files. I need to copy the name of one of them and rename all files.
My solution was not by using column mode, but by merging the 3 filenames into one line with a simple key press (Ctrl+J).
yahuu wrote: 2023-11-14, 05:18 UTC If there are three files, I want to rename them all to the name of one of the files. It's name is 20+ characters long and I don't want to type it with a keyboard or worry about making typos, I just copy the name and paste it into the filename text box.
It seems you don't understand the step-by-step instructions I listed.
Three names merged into one is just a possibility.
I understand the step-by-step instructions you said.

Let me give two more examples:
Don't worry about the naming logic, Chinese is not easy for you to understand. I'm using randomly generated English names as examples.

old name
Financial_Statement_Analysis_Reportxlsx
Budget_Planning_and_Forecasting_Template.xlsx
Internal_Audit_Findings_and_Recommendations.xlsx

new name1:
Report_Template_Recommendations_Planning_01.xlsx
Report_Template_Recommendations_Planning_02.xlsx
Report_Template_Recommendations_Planning_03.xlsx

new name2:
Budget_Planning_and_Forecasting_Audit_Findings_and_Recommendations_01.xlsx
Budget_Planning_and_Forecasting_Audit_Findings_and_Recommendations_02.xlsx
Budget_Planning_and_Forecasting_Audit_Findings_and_Recommendations_03.xlsx
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Want to copy original filename in Multi-Rename tool

Post by *hi5 »

With the above examples all you have to do with "my" suggestions is just type the words you want to remove in the find/replace, "_Report|_Template|Internal_" - to fine tune open them in the Editor.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *yahuu »

hi5 wrote: 2023-11-14, 17:53 UTC With the above examples all you have to do with "my" suggestions is just type the words you want to remove in the find/replace, "_Report|_Template|Internal_" - to fine tune open them in the Editor.
Thank you very much for your thoughtful reply.

My goal is simple: when entering a new name, I want to be able to paste part or all of the old name into the text box. The above method only adds complexity and does not solve my problem.
I can now copy within the range textbox, but it requires two more mouse clicks

After replacing "_Report|_Template|Internal_", I still need to enter the editor
If it can be copied, I will copy the last two names and modify them.
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *yahuu »

sa16 wrote: 2023-11-14, 06:39 UTC 2yahuu
In your example of 3 files, what will be the original filename?
Is "Result list" (in MRT) suitable for you, together with [X]?
There are many possibilities for the new name, perhaps part or all of each.
The function of [X] is to concatenate all names and then enter the editor to modify them.
But I may only need to copy part of the names of two of them for splicing and modification.
Of course, I can exit MRT and copy in the file list, and then re-enter MRT, but this is inconvenient.

It would be better if the old name could be entered into the text box and a part of it could be copied. (But still remain read-only as now)
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *sa16 »

2yahuu
Select files
Start MRT
F10
Edit names…
Create a new name in the editor from three old ones (in a separate line, for example):
Budget_Planning_and_Forecasting_Audit_Findings_and_Recommendations
Copy the new name to the clipboard (Ctrl+C)
Close the editor
Refuse to download changed names
Insert a new name (Ctrl+V) in “Rename mask: file name” (instead of [N])
Add _[C:2]
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Want to copy original filename in Multi-Rename tool

Post by *hi5 »

There is probably no way getting around to going to an editor before/during the MRT process.

If you where to be able to do it all in MRT one would need to be able to distinguish the individual file names, so rather than simply [N], they would need identifiers, such as [1:N][2:N][3:N] (1st, 2nd, third file] - then you can use [1:N1-10][2:N5-12][3:N3-] and use the #-# options of [N]

Then you can swap the order of the file names by moving the up/down in the list as well.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Want to copy original filename in Multi-Rename tool

Post by *petermad »

If there are three files, I want to rename them all to the name of one of the files.
And how should TC now wich of the file names to use?

When you are in the MRT you can find the file with the name you want to use, click the [N#-#] Range button, copy the file name from the dialog, click Cancel in the dialog (or press Esc) and then paste the filename into the "Rename mask" field.

I just saw that Stefan2 also suggested this <viewtopic.php?p=444936#p444936>
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
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *sa16 »

2petermad
petermad wrote:you can find the file with the name you want to use, click the [N#-#] Range button
yahuu wrote:This is how I use it now, but if I want to copy several, it will be very troublesome
Or yahuu does something wrong...
Last edited by sa16 on 2023-11-15, 07:35 UTC, edited 1 time in total.
User avatar
petermad
Power Member
Power Member
Posts: 14810
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Want to copy original filename in Multi-Rename tool

Post by *petermad »

Then I can only suggest to copy the names before you open the MRT.
Press Ctrl+Enter on each file - that will copy the filenames to the Command line where you can copy them from.
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
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *yahuu »

sa16 wrote: 2023-11-14, 23:24 UTC 2petermad
petermad wrote:you can find the file with the name you want to use, click the [N#-#] Range button
yahuu wrote:This is how I use it now, but if I want to copy several, it will be very troublesome
Or yahuu does something wrong...
If I want to copy 5 names, I have to click the [N#-#] Range button 5 times, and I also need to close the pop-up window.
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *yahuu »

petermad wrote: 2023-11-15, 00:19 UTC Then I can only suggest to copy the names before you open the MRT.
Press Ctrl+Enter on each file - that will copy the filenames to the Command line where you can copy them from.
If I can copy the old filenames in the MRT, I don't need to copy them beforehand.
In MRT, I can copy whichever name I want to copy.
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: Want to copy original filename in Multi-Rename tool

Post by *yahuu »

sa16 wrote: 2023-11-14, 19:46 UTC 2yahuu
Select files
Start MRT
F10
Edit names…
Create a new name in the editor from three old ones (in a separate line, for example):
Budget_Planning_and_Forecasting_Audit_Findings_and_Recommendations
Copy the new name to the clipboard (Ctrl+C)
Close the editor
Refuse to download changed names
Insert a new name (Ctrl+V) in “Rename mask: file name” (instead of [N])
Add _[C:2]
I know how to use the editor in MRT

If the new name is a combination of the names of the third and fifth files
Just select 3, copy, paste, then select 5, copy, paste, append [C]
I don't need to go into the editor
Post Reply