#1 2022-01-16 13:40

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Selectively change the case of filename parts

Hi smile
Is it possible rename:


11 - Il Vero AMORE (feat. zampa, rido mc, gomez)

I want

11 - Il vero amore (Feat. Zampa, Rido Mc, Gomez)


Another example

06 - Barre aSTRALi Celesti (feat. blodi B, naghe, Zeus one)

to

06 - Barre astrali celesti (Feat. Blodi B, Naghe, Zeus One)


in practice I would like the first capital letter of everything contained in the parenthesis and, in the title of the song, only the first capital letter

Thanks smile

Last edited by Lauraq (2022-01-16 13:42)

Offline

#2 2022-01-16 22:04

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Selectively change the case of filename parts

If I'll find some free time I will reuse that

>> https://www.den4b.com/forum/viewtopic.p … 215#p12215 

example and adjust the regex for you. (now its too late for me and I am afraid my brain is not fit enough)






 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2022-01-16 23:13

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Re: Selectively change the case of filename parts

Yes...is a my question, I remember it but this is a new situation sad
Don't worry, help me when you want/have time and without haste  smile

Last edited by Lauraq (2022-01-16 23:13)

Offline

#4 2022-01-17 12:00

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Selectively change the case of filename parts

Try that...


FROM:
06 - Barre aSTRALi Celesti (feat. blodi B, naghe, Zeus one)
TO:
06 - Barre astrali celesti (Feat. Blodi B, Naghe, Zeus One)

TRY:
1) Case: Capitalize every word (skip extension)
2) Regular Expressions: Replace expression "^(.+?[a-z])(.+)\(" with "\U$1\L$2(" (skip extension)



Explanation:
(.+?[a-z]) >> give me all, non-greedy, till one char from group of A-Z, and store in group 1 >>>06 - B<<<
(.+)\( >> give me next all till one open parenthesis, and store in group 2 >>>arre aSTRALi Celesti (<<<
Replace:
\U$1 >> give me content of group 1 and change all chars to upper case >>>06 - B<<<
\L$2( >> give me content of group 2 and change all chars to lower case >>>arre astrali celesti (<<<


\L     Convert all characters to lowercase.
\l     Convert only the first character to lowercase (that's a lower case L).
\U     Convert all characters to uppercase.
\u     Convert only the first character to uppercase. > do not work here, because it works on the first sign, not necessary on the first char.

Note: The "\U" for "$1" is not really need here, as it is already uppercase, but used just for an example in case somebody need it for his/her issue.

See our RegEx reference for more details
>> http://www.den4b.com/wiki/ReNamer:Regul … ipulations




.


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#5 2022-01-17 18:08

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Re: Selectively change the case of filename parts

thanks smile but there is a problem when the songs is named without "(feat"
for example

06 - Une chrononaute à paris

is renamed in

06 - Une Chrononaute À Paris

sad

And another problem, the script rename all world in "(" and I want only when there is "(Feat" or "(feat"

for example, it rename

08 - Let me sleep beside you (alternative mix, 2021 remaster)

in

08 - Let me sleep beside you (Alternative Mix, 2021 Remaster)

Thanks for your help...and patience smile

Offline

#6 2022-01-17 18:45

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Selectively change the case of filename parts

That's why it's important to well design the question and provide every possible source as example, because the answer base on that.



I will take a look...





 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#7 2022-01-17 19:02

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Re: Selectively change the case of filename parts

thanks smile

Offline

#8 2022-01-18 18:15

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Selectively change the case of filename parts

Lauraq wrote:

but there is a problem when the songs is named without "(feat"

And another problem, the script rename all world in "("
and I want only when there is "(Feat" or "(feat"





So only problem is that other files which doesn't have "(feat" in name are renamed too?


FROM:
06 - Barre aSTRALi Celesti (feat. blodi B, naghe, Zeus one).ext
07 - Barre aSTRALi Celesti (Feat. blodi B, naghe, Zeus one) - Kopie.ext
08 - Une chrononaute à paris.ext
09 - Let me sleep beside you (alternative mix, 2021 remaster).ext

TO:
06 - Barre astrali celesti (Feat. Blodi B, Naghe, Zeus One).ext
07 - Barre astrali celesti (Feat. Blodi B, Naghe, Zeus One) - Kopie.ext
08 - Une chrononaute à paris.ext
09 - Let me sleep beside you (alternative mix, 2021 remaster).ext



Solution:

1) add your files

2) right click context menu on files and select "Mark by Mask" and enter *(feat*
((see >> https://www.den4b.com/wiki/ReNamer:File … rk_submenu ))

3) add both rules from above

4) rename



?

 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#9 2022-01-18 18:48

Lauraq
Member
Registered: 2016-10-02
Posts: 86

Re: Selectively change the case of filename parts

sad no, the problem is that even year titles are capitalized, for example

05 - Wanna Be MYSELF

and I want

05 - Wanna be myself

Offline

#10 2022-01-19 17:38

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Selectively change the case of filename parts

Lauraq wrote:

sad no, the problem is that even year titles are capitalized, for example

05 - Wanna Be MYSELF

and I want

05 - Wanna be myself



Sorry, I don't understand.

1) "year titles" ? But not in that example, no?
2) "05 - Wanna Be MYSELF" is not touched , if you only select file name like *(feat* , see my last post above.








 


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

Board footer

Powered by FluxBB