Change case of part of file in main window of TC

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Wombat
Junior Member
Junior Member
Posts: 9
Joined: 2004-01-21, 12:17 UTC

Change case of part of file in main window of TC

Post by *Wombat »

G'day
Can any one tell me if changing the case of text in file names in main window is possible
The problem would never exist if I were a good typist
Most of the file names I work with are in the format of : Surname, Christian Names
I like to keep file names Surname section capitalised

adams james cyril to ADAMS James Cyril


These commands are available within Multi Rename Tool - all lowercase
- all UPPERCASE
- first letter Uppercase
- first of each uppercase
Is there any way I can use these functions/commands within main window on highlighted section of filename ?


Cheers
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

there is also available:

All characters after this position in uppercase

[L] All characters after this position in lowercase

[n] All characters after this position again as in original name (upper/lowercase unchanged)


taken from "Total Commander Help Index
j. Multi-rename tool...
Dialog Box - Multi-rename tool"

That should do the trick, souldn't it?

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Vansumsen
Power Member
Power Member
Posts: 761
Joined: 2003-11-09, 08:16 UTC
Location: Belgique
Contact:

Post by *Vansumsen »

Hi Wombat,

After a lot of tries the unique solution I found with Multi-Rename-Tool is to enter [F] before the [N] in the "Rename mask : File name"...
The result is "Adams James Cyril"

The best solution was :
1° enter before the [N]
2° enter a "space" in the "search for :"
3° enter "space"[F] in the "replace with :"

But it did not work... the replacement doesn't understand the as a format command... :(

Some body an other solution ?

If not :
2 Ghisler
Hi Christian,
Just a little whish for one of the future version of TC: Format command like [F], , [L].... available also into "Replace with" of the "Search & Replace" box of the "Multi-Rename-Tool".
TIA
Best regards,
Paul
Ouistiti, #11943

L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Vansumsen wrote: Some body an other solution ?
adam james cyril
santana carlos richard
gildesheim heribert anton

You have to make 2 replaces:
1.

Code: Select all

Rename mask: file name = [F][N]
Extension                        = [E]
Search and replace:Search for=( )(.+)
Search and replace:Replace with=.$2
RegEx=ON
UpperLowercase=unchanged
You change all First Letters To Uppercase and replace the first 'space' with 'dot'. Now the surname is the filename and the christian name(s) is(are) the extension.

2.

Code: Select all

Rename mask: file name = [U][N][n]
Extension                        = [E]
Search and replace:Search for=. 
Search and replace:Replace with= 
(replace dot with space)
RegEx=OFF
UpperLowercase=unchanged
Now you change the filename to ALL UPPERCASE leave the extension As It Is and replace the 'dot' with a 'space'.

Fits it??

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Vansumsen
Power Member
Power Member
Posts: 761
Joined: 2003-11-09, 08:16 UTC
Location: Belgique
Contact:

Post by *Vansumsen »

Bravo Sheepdog, all my admiration... :D

It works fine...

Please, where can I find the documentation about the (.+) and the (.$2) :?:

Just 2 replaces more when the files already have different extensions !

Regards, and thanks.

Paul
Ouistiti, #11943

L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

2Vansumsen
Thx for the compliment.
Please, where can I find the documentation about the (.+) and the (.$2)
Please See:

Total Commander Help Index
3. Operation
n. Regular expressions

'.' means any character
'+' means at least one
the '()' read the search result of the included term into a variable
'$2' represent the variable read from the brackets - while the number is the place of the brackets in the whole search string ( In my example the '$1' would be a 'space' of course)

kind regards
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Vansumsen
Power Member
Power Member
Posts: 761
Joined: 2003-11-09, 08:16 UTC
Location: Belgique
Contact:

Post by *Vansumsen »

2Sheepdog
:oops: Shame on me... it was in the HELP !
I shall print it and put it under my pillow !
We never read enough the Help...
Great thanks
Friendly
Paul
Ouistiti, #11943

L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Vansumsen wrote:We never read enough the Help...
So true, I just learned yesterday about the ':' for virtual folders in 'Noreread' item. And not from the help.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Wombat
Junior Member
Junior Member
Posts: 9
Joined: 2004-01-21, 12:17 UTC

Post by *Wombat »

Sheepdog, Paul,

Thanks for your help & solution using the Rename Tool
Its tops that you can work solutions so quick
Thanks

Solution works fine if there is no file extension to start with
How do you do the same thing with the file extension as well

adams james cyril.fs to ADAMS James Cyril.Fs



Can any of the commands
-UPPERCASE
[F]-First Letter Upper
be assigned to buttons on buttonbar
Then button can be used with Quick Rename in main window

Cheers
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Wombat wrote:How do you do the same thing with the file extension as well

adams james cyril.fs to ADAMS James Cyril.Fs

Code: Select all

1. 
Rename mask: file name = [N]
Extension                        = [E]
Search and replace:Search for=.
Search and replace:Replace with=; ( or any other char you are sure the filenames do NOT contain)
RegEx=OFF
UpperLowercase=unchanged

Change the 'dot' to another char, so you have no actual extension.

2.
Code:

Rename mask: file name = [F][N]
Extension                        = [E]
Search and replace:Search for=( )(.+)
Search and replace:Replace with=.$2
RegEx=ON
UpperLowercase=unchanged


You change all First Letters To Uppercase and replace the first 'space' with 'dot'. Now the surname is the filename and the christian name(s) is(are) the extension.

3.
Code:
Rename mask: file name = [U][N][n]
Extension                        = [E]
Search and replace:Search for=.
Search and replace:Replace with=
(replace dot with space)
RegEx=OFF
UpperLowercase=unchanged

4. 
Rename mask: file name = [N]
Extension                        = [E]
Search and replace:Search for=; ( or the other char you selected in 1.)
Search and replace:Replace with=.
RegEx=OFF
UpperLowercase=unchanged

Rebuild the former extension by inserting again the 'dot'.

Can any of the commands
-UPPERCASE
[F]-First Letter Upper
be assigned to buttons on buttonbar
Then button can be used with Quick Rename in main window

Cheers


No, not until now. But the next version of TC may contain the possibility to use MRT as external prog with parameters. @ghisler considered to build in such feature (but did not promise till now).

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Wombat
Junior Member
Junior Member
Posts: 9
Joined: 2004-01-21, 12:17 UTC

Post by *Wombat »

Thanks Sheepdog
Post Reply