Subject: Re: [Name Mangler Talk] How to apply UPPERCASE to part of file name?

From: Markus Wernig <[email-masked]>
Date: Wed, 24 Feb 2021 17:04:14 +0100

Of course! I forgot that you can add multiple steps.

Thank you!

Markus

> On Feb 24, 2021, at 4:54 PM, Rob Griffiths <[email-masked]> wrote:
> 
> On Feb 24, 2021, at 7:49 AM, Markus Wernig <[email-masked] <mailto:[email-masked]>> wrote:
> 
>> If I wanted to take it one step further and guarantee that the first part of the file name is formatted as what you guys call TITLECASE - is there a regex code for that? I was not able to find one.
> 
> There may be other ways to pull this off, but the easiest (to me, anyway) appears to be as shown in the attached screenshot: Just add a new Change Case action as the first step. That will change the case on the entire name, but you're going to uppercase the second part anyway, so the net effect is that just the first part is affected (see "bad case example... in the list).
> 
> -rob.
> 
> 
> 
> 
> 
> -- 
> -- 
> You received this message because you are subscribed to the Name Mangler Talk group. To post to this group, send email to [email-masked]. To unsubscribe from this group, send email to [email-masked].
>  
> For more options, visit the Name Mangler Talk web page at <http://groups.google.com/group/name-mangler-talk <http://groups.google.com/group/name-mangler-talk>>
> 
> --- 
> You received this message because you are subscribed to a topic in the Google Groups "Name Mangler Talk" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/name-mangler-talk/9CnqTtrOuAo/unsubscribe <https://groups.google.com/d/topic/name-mangler-talk/9CnqTtrOuAo/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to [email-masked] <mailto:[email-masked]>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/name-mangler-talk/345DDEF0-DCFE-4330-AA1F-630F00394265%40manytricks.com <https://groups.google.com/d/msgid/name-mangler-talk/345DDEF0-DCFE-4330-AA1F-630F00394265%40manytricks.com?utm_medium=email&utm_source=footer>.

---

From: Rob Griffiths <[email-masked]>
Date: Wed, 24 Feb 2021 07:54:55 -0800

-rob.

---

From: Markus Wernig <[email-masked]>
Date: Wed, 24 Feb 2021 16:49:21 +0100

Fantastic. Thank you so much!

I searched under “titlecase”, “first caps of words” - nothing. All I found was lowercase and uppercase.

Maybe you know how to pull this off.

Thank you!

> On Feb 24, 2021, at 4:11 PM, Rob Griffiths <[email-masked]> wrote:
> 
> On Feb 24, 2021, at 7:04 AM, Markus Wernig <[email-masked] <mailto:[email-masked]>> wrote:
> 
>> I am sure there is a "simple" solution for this task. The naming convention is always the same - two parts separated by an underscore.
> 
> In the scheme of complex renaming actions, it is relatively simple. One Find and Replace using regular expressions, as seen in the screenshot.
> 
> Find: (.*)_(.*)
> 
> In regex speak, find any number of characters followed by an underscore, and save those characters as the first capture group, $1. After the underscore, find any number of characters, and save them into the second capture group, $2.
> 
> Replace: $1_\U$2
> 
> The \U applies upper case to whatever follows, in this case, the second capture group.
> 
> Hope that helps!
> 
> -rob.
> 
> 
> 
> 
> 
> -- 
> -- 
> To view this discussion on the web visit https://groups.google.com/d/msgid/name-mangler-talk/7D7F0DA0-53C0-4DF9-A85A-B9B626C67290%40manytricks.com <https://groups.google.com/d/msgid/name-mangler-talk/7D7F0DA0-53C0-4DF9-A85A-B9B626C67290%40manytricks.com?utm_medium=email&utm_source=footer>.

---

From: Rob Griffiths <[email-masked]>
Date: Wed, 24 Feb 2021 07:11:56 -0800

Find: (.*)_(.*)

Replace: $1_\U$2

Hope that helps!

-rob.

---

From: Markus Wernig <[email-masked]>
Date: Wed, 24 Feb 2021 07:04:57 -0800 (PST)

This may require a code snippet. But here's what I'd like to achieve,
I have hundreds of audio file names that are all structured like this:

*(filename part a)_(filename part b).aif*

This is what it looks like with real file names:

*Coasting_Synth 1.aif*
*All Or Nothing_Percussion.aif*

I am looking for a piece of code that automates the process of turning the 
second half of each file name (after the underscore) into UPPERCASE. So the 
files should all look like this when all is said and done:

*Coasting_SYNTH 1.aif*
*All Or Nothing_PERCUSSION.aif*

I am sure there is a "simple" solution for this task. The naming convention 
is always the same - two parts separated by an underscore.

Thank you so much in advance for pointing me in the right direction.

Markus