MRT: each word uppercase, but extension too.

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

MRT: each word uppercase, but extension too.

Post by *sidefx88 »

Hi!
I'm having a little problem using TC 8.51a MRT (maybe it's my fault, due to missing some detail, option, checkmark or something)

I need to multirename some folders using 'First of each word uppercase' mode. It works fine for the most of the folders, but some not.

I've finally find the pattern: the folders which have a dot (.) in their names stop renaming using the mentioned mode after the dot.

Examples:

folder name -> Folder Name (OK!)

folder with a longer name -> Folder With A Longer Name (OK!)

folder named by mr. john doe -> Folder Named By Mr. john doe (WRONG!)

Any suggestion on how to solve this?
Maybe TC gets the part after the dot (.) as an extension, so it's not working the way I need.

Thanks!
I Love Total Commander!
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Question about Multi Rename Tool

Post by *nsp »

sidefx88 wrote:Hi!
I'm having a little problem using TC 8.51a MRT (maybe it's my fault, due to missing some detail, option, checkmark or something)

I need to multirename some folders using 'First of each word uppercase' mode. It works fine for the most of the folders, but some not.

I've finally find the pattern: the folders which have a dot (.) in their names stop renaming using the mentioned mode after the dot.

Examples:

folder name -> Folder Name (OK!)

folder with a longer name -> Folder With A Longer Name (OK!)

folder named by mr. john doe -> Folder Named By Mr. john doe (WRONG!)

Any suggestion on how to solve this?
Maybe TC gets the part after the dot (.) as an extension, so it's not working the way I need.

Thanks!
The "." is understood as separator between name and extension (even if it make no sense for folder...) What you can do is to tick the [E] option (also replace in extension) this is normally located near the Replace With : Text Field on the next line.
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Post by *sidefx88 »

nsp: thanks! I've already try ticking that box, but I always get the same result :(
I Love Total Commander!
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

I don't think there's a way to do this out-of-the-box,
simply because TC sees the last dot as ("virtual") extension.
(no matter how many dots exist before that)

So you have no choice but to do this in two MRT steps, for example:
First:
Search:

Code: Select all

.
Replace:

Code: Select all

  
i.e. two space characters (so you can distinguish them later),
and choose capitalization (it's done directly after s&r)

2nd: restore original dots
(no need to close MRT, just use the "(next step)" button or F5)
Search:

Code: Select all

  
(two space characters)
Replace:

Code: Select all

.
Now deselect capitalization!

Of course you can choose some other non-conflicting characters as temporal replacement. (maybe ^ or @)
TC plugins: PCREsearch and RegXtract
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

It's possible in one step - with Total Commander 5.51 (or older).
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Post by *sidefx88 »

Thanks, milo2012; I guess I will use this 2-step method, at least until Gral tell us how to do it in just one step :)

Thanks to the both of you.
I Love Total Commander!
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

Just use TC version 5.51 (version 6.01 should works this way too):

HISTORY.TXT

Code: Select all

23.01.04   Added: Multi-rename tool: First letter per word uppercase: Don't do this in the file extension
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Multi Rename Tool: word uppercase whole name incl. extension

Post by *Stefan2 »

sidefx88 wrote:I need to multirename some folders using 'First of each word uppercase' mode.

: the folders which have a dot (.) in their names stop renaming using the mentioned mode after the dot.

I would just use e.g. "Scarabée Software Renamer: Siren":



** Download Siren Renamer from
http://scarabee-software.net/en/download.html

** The older 2.01 version (400kb) is just fine.

** Unpack it to "%Commander_Path%\Tools\Siren"

- - -

Preparations:

** Create an button:
Command: %Commander_Path%\Tools\Siren\Siren.exe
Parameter: %S
Icon: %Commander_Path%\Tools\Siren\Siren.exe
Tooltip:Start Siren Renamer with [selected] file(s)



** If you want, create a user defined tool in usercmd.ini, like:
[em_Siren]
cmd=%Commander_Path%\Tool\Siren\Siren.exe
param=%S
menu=Launch Siren Renamer with [selected] file(s)



** You can even assign an shortcut in wincmd.ini to that em_ command:
[Shortcuts]
;Call Siren by pressing Ctrl+Alt+M:
CA+M=em_Siren


(See TCs' help for more)


- - -

Work:

Put your cursor on the file to rename,
(or select a few files for renaming,)
and execute your new user command.


Example:

Q: I need to multirename some files, both base name and extension, using 'First of each word uppercase' mode.

A: In Siren enter %Uf as expression.

Explanation:
%f means: work on the whole file name.
'U' means "first character of each word upper case, the others lower case.
The words are separated by the characters specified in "Options/Modifications"."


------------------------------------------------------------------------------------------------------------

Siren is a freeware file renaming program
- portable, highly flexible, powerfully -
If it's looking tricky it's easy to rename with Siren.
http://www.scarabee-software.net/en/siren.html




Siren is a freeware file renaming program - portable, flexible, powerfully, with preview, perl regex, meta data extraction,...
No installation needed, unzip and run. Siren stores it settings into an INI-file, not in the Registry.
If it's looking tricky, it's easy to rename with Siren. Press the F1-key while you are in Siren to read more about.
Homepage: http://www.scarabee-software.net/en/siren.html (The older v2 is enough and only 400kB against 10MB for v3, but v3 works on Linux too)
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Multi Rename Tool: Uppercase first char extension

Post by *Stefan2 »

sidefx88 wrote:I need to multirename some folders using 'First of each word uppercase' mode.

: the folders which have a dot (.) in their names stop renaming using the mentioned mode after the dot.
With TC MUT:

Filename box: [F][N].[E1][L][E2-]


Explanation:

[F] First letter of each word uppercase after this position, all others lowercase
[N] old file name, WITHOUT extension


All characters after this position in uppercase
[E1] first sign of Extension

[L] All characters after this position in lowercase
[E2-] second till last sign of Extension


 
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

How about just:

Filename field: [F][N]
Extension field: [F][E]

That seems to work
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
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

petermad wrote:How about just:

Filename field: [F][N]
Extension field: [F][E]

That seems to work
Uiih, fine!


Of course, that's logic. :thumpsup: (silly me :roll: )


 
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Post by *sidefx88 »

Thanks Stefan2 and petermad!!

I've tried with the very simple [F][N] / [F][E] method petermad suggested, and worked fine!

:)
I Love Total Commander!
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

sidefx88 wrote:Thanks Stefan2 and petermad!!

I've tried with the very simple [F][N] / [F][E] method petermad suggested, and worked fine!

:)
It seems that you can even omit the [F] for the extension !
So there is to my understanding two bugs/inconsistencies...
- the "First Letter or each word Uppercase" does not take into account the [E] option.
-the latest "[Case operator]" in Name is also used for Extension field
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Strange, when I tried yesterday it didn't seem to work without the [F][E] - but now when I try again I can confirm that [F][N] is enough
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
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

2nsp

nice find :thumpsup: :D


 
Post Reply