Multirenaming Tool - [N] - for folders with dot

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: Multirenaming Tool - [N] - for folders with dot

Post by *sa16 »

2monarch-lfv
try to rename
If, nevertheless, in two steps?
Command:

Code: Select all

cm_CopyNamesToClip,cm_ClearAllFiles,em_MRT_pre_Folders,cm_LoadSelectionFromClip,cm_ClearAllFolders,em_MRT_pre_Files
usercmd.ini

Code: Select all

[em_MRT_pre_Folders]
cmd=multirename pre_Folders
[em_MRT_pre_Files]
cmd=multirename pre_Files
wincmd.ini
[Rename]

Code: Select all

pre_files_name=[N]
pre_files_ext=[E]
pre_files_params=0|1|1|1
pre_Folders_name=[A]
pre_Folders_params=0|1|1|1
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Multirenaming Tool - [N] - for folders with dot

Post by *petermad »

2monarch-lfv
That would call for RegExp (which I am not strong in) but this works for your example:
Search for: .*(v1\d\.0).*(.zip|\.)
Replace with: $1$2
[x] E [x] RegEx [x] Subst.

https://tcmd.madsenworld.dk/searchandreplaceregex.png
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
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *monarch-lfv »

2sa16
Too complicated for the simplest operation.
There is a simpler way than what you suggested (2 steps):
1. Select files - rename with mask: Name: [N6-10], Extension: [E]
2. Select folders - rename with mask: Name: [A6-10], Extension: Empty.
For second step may [N6-10] for this example. But for universality best [A6-10].
This is the simplest solution so far. But, alas, I don't like it either. :wink:

2petermad
Too complicated for the simplest operation.
The regular expression in your case is not universal, it is tied to a specific extension - zip (and text of filename "v1"), and if there are several different extensions?

Understand, I know that you can achieve results in various ways. But all the solutions you have listed are very time-consuming - that's the main thing.
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *sa16 »

2monarch-lfv
I have given a way not for this particular example, but with a claim to universality. :)
Pre from preparation.
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *monarch-lfv »

2sa16
Thanks, and sorry, but Your solution is not very convenient :(
I also have to manually set 2 different masks for files and for folders.
I understand that everyone except me is satisfied with this functionality. :cry:
I just wanted the versatility of renaming folders and files with the same name (not counting the file extension, which is essentially inherent only to the file), which any archiver gives by default.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Multirenaming Tool - [N] - for folders with dot

Post by *ghisler(Author) »

How about this idea: I could add a new placeholder which tells TC to ignore dots in folder names after that position, e.g.
[N] would then contain the entire folder name, and a later coming [E] would be empty.
Author of Total Commander
https://www.ghisler.com
monarch-lfv
Junior Member
Junior Member
Posts: 73
Joined: 2022-06-16, 23:37 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *monarch-lfv »

2ghisler(Author)
Very good Idea! Thank you! :D
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *sa16 »

2monarch-lfv
The folder and file names are identical, except for the file extension (as all archivers usually do). That is, the renaming rule should also be essentially the same.
How to do it?
You can do this:
Rename mask: file name [N6-12][=tc.directory]^ Extension: [E] Search for: Yes^*|No^
Instead of N, A may be used.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3293
Joined: 2003-05-06, 11:46 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *Sir_SiLvA »

sa16 wrote: 2023-05-30, 20:26 UTC You can do this:
Rename mask: file name [N6-12][=tc.directory]^ Extension: [E] Search for: Yes^*|No^
Instead of N, A may be used.
That solves
monarch-lfv wrote: 2023-05-28, 21:53 UTC

Code: Select all

Fold v11.0.0.anyInformation     (folder)
Prog v10.0.0.35798              (folder)
Fold v11.0.0.anyInformation.zip (file)
Prog v10.0.0.35798.zip          (file)
Rename (character 6 to 10) to:

Code: Select all

v11.0       (folder)
v10.0       (folder)
v11.0.zip   (file)
v10.0.zip   (file)
very beautifully :!: but why the ^ ?

PS: mayhaps add that Yes and No have to be replaced by the words for them in the language used.
Hoecker sie sind raus!
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *sa16 »

2Sir_SiLvA
but why the ^ ?
Just in case, he added: if yes or no come across in the file names, for example Fold v11.yes.anyInformation.
Instead of ^, you can use, for example, ;, # and the like. More reliable ;.
Yes and No have to be replaced by the words for them in the language used.
It is possible to supplement: Yes;*|No;|Ja;*|Nein;

Add.
Unfortunately, the solution is not universal: try instead of [N6-12], for example [N6-20] or [N6-].
So we are waiting for the promised decision of the author.
Fla$her
Power Member
Power Member
Posts: 2297
Joined: 2020-01-18, 04:03 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *Fla$her »

HISTORY.txt wrote:29.05.23 Added: Multi-rename tool: New placeholder [I] or [I1] to ignore dots in folder names ([I0] to return to normal), so [N] contains the entire folder name and [E] is empty after this point (32/64)
Only the drop-down list item for the [±] button is missing.
Overquoting is evil! 👎
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3293
Joined: 2003-05-06, 11:46 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *Sir_SiLvA »

Fla$her wrote: 2023-05-31, 17:28 UTC Only the drop-down list item for the [±] button is missing.
not confirmed neither on 32 nor 64bit.
Hoecker sie sind raus!
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Multirenaming Tool - [N] - for folders with dot

Post by *hi5 »

Sir_SiLvA wrote: 2023-05-31, 17:47 UTCnot confirmed neither on 32 nor 64bit.
Just to be sure: when you click the +/- button you do see [ I ] ? (I don't)
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)
Fla$her
Power Member
Power Member
Posts: 2297
Joined: 2020-01-18, 04:03 UTC

Re: Multirenaming Tool - [N] - for folders with dot

Post by *Fla$her »

Sir_SiLvA wrote: 2023-05-31, 17:47 UTC not confirmed neither on 32 nor 64bit.
Screenshot?
Overquoting is evil! 👎
User avatar
AntonyD
Power Member
Power Member
Posts: 1246
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Multirenaming Tool - [N] - for folders with dot

Post by *AntonyD »

If we talk about "

Code: Select all

New placeholder [I] or [I1]
" yes - there is no such item (3 items?

Code: Select all

[I] or [I1] or [I0]
)
in drop-down list of button "±".
#146217 personal license
Post Reply