Welcome Guest

Pages: 1
lower-TitleCase with First capital?
2manyFLACPostAugust 29, 2018, 06:28
Newbie
Posts: 10
Registered:
September 20, 2015, 11:49
Normal topiclower-TitleCase with First capital?

Hi there - i am trying to rename my files such that they are Title Case (with exceptions for the, a, as, et cetera) but also that they are lower case, with the first word always Title (with no exceptions).

e.g.
TITLE > Title
Song IS NAMED like tHis > Song is Named Like This
the song is LIKE tHe OTHER > The Song is Like the Other

I had tried added my rename template with the default "lower-Title Case" into an action that also does First Capital, but just ended up with, per above example

The song is like the other

any tips appreciated!

2MR2PostAugust 29, 2018, 06:49
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: lower-TitleCase with First capital?

Hmm. I guess it depends on the sequencing of things. I'm not sure what you are doing in the action regarding 'First Capital'. Certainly you're ending up with a transformation of Capitalize First.

If I test your pattern in Preferences-General-Title Case, I pretty much get what you want. If I test it in a rename template specifying Title an a lower-upper case transformation I also get what you want. Remember that the set of 'lower case' words is configured in your Title Case Exception list.

I'd have to see your action to know why you're ending up with Capitalize First. The easiest way to do that is to do a Copy Action (text) to Clipboard from the context menu in an action editor window. A better solution is to export the action, zip it up and email it to support@2manyrobots.com. Please supply a prefix identifier when exporting so that we can find all the components easily after importing.

2MR2PostAugust 29, 2018, 06:50
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: lower-TitleCase with First capital?

Sorry I meant 'lower-Title case' .... not 'lower-upper'.

2manyFLACPostAugust 29, 2018, 11:11
Newbie
Posts: 10
Registered:
September 20, 2015, 11:49
Normal topicRe: lower-TitleCase with First capital?

hmm OK here is my rename template - I will play around with putting this in an action. if that fails I will send my files to you 🙂

❨Disc Pad2❩·❨Track Pad2❩·❨Title❩

❨IfDup❩·(❨Dup #❩)
❨endIf❩

❨Folder Start❩
❨IfExists Album Artist❩❨Album Artist❩
❨Else❩❨Artist❩
❨endIf❩

·[❨Year❩]·❨Album❩·(❨File Type❩·❨Bit Depth❩bit)

above is my rename template - not even an action in this case - with lower-TitleCase (and inherent default exceptions) applied.

the preview output is, for example
Artist [2018] The Album Is Named Here (Flac 16bit)\01 09 the example.flac
-->
Artist [2018] the Album is Named Here (Flac 16bit)\01 09 the Example.flac

2manyFLACPostAugust 29, 2018, 11:20
Newbie
Posts: 10
Registered:
September 20, 2015, 11:49
Normal topicRe: lower-TitleCase with First capital?

in other words... how can i make

The tHE the THe tiTle And Other Words
->
The the the the Title and Other Words

where the first is capitalised, but the others are exceptions to 'Title Case'

2MR2PostAugust 29, 2018, 11:48
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: lower-TitleCase with First capital?

Okay it all makes sense now. Title Case (both variants) are sentence aware. The filename portion of the path is treated as a sentence. Your sentence is:

01 01 the the the the Title and Other Words

So...the first 'the' does not start the sentence. There are two ways to fix the issue.

The first is to put a period after your (Track Pad2) token.

If you want to keep the original template do the following:

In your Rename Template, set the Case option to 'No Change'. Then change the first line of the template to:

❨Disc Pad2❩·❨Track Pad2❩·❨Variable 1❩

ie. replace (Title) with (Variable 1)

Create an action as follows:

Copy the Title field to Variable 1
Case lower-Title Case in Variable 1
Rename Files (test)

where 'test' on the Rename statement is the name of your modified template.

In the action manager you can then place the new action onto the Rename menu. It will then appear on the Actions submenu on the Rename menu.

2manyFLACPostAugust 29, 2018, 11:59
Newbie
Posts: 10
Registered:
September 20, 2015, 11:49
Normal topicRe: lower-TitleCase with First capital?

hmm, i *think* i have resolved this.

Action:
case lower
case First capital
case Title Case with exceptions (exceptions: The - no change on exact match)
Rename files per previous standard with No Change to case

... 🙂

2MR2PostAugust 29, 2018, 12:04
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: lower-TitleCase with First capital?

That will work if you only want the first character capitalized...that's not Title Case 🙂

v4.3 has Sentence Case. You will be able to fold your two case statements into one.

2manyFLACPostAugust 29, 2018, 12:18
Newbie
Posts: 10
Registered:
September 20, 2015, 11:49
Normal topicRe: lower-TitleCase with First capital?

Seems to work exactly like I needed -

it's Camel Case with exceptions for the,a,v,vs etc - but when "The" appears it doesn't change it.

And "The" (as opposed "the") can only appear at the start as the action makes all words lower case, then only the first word Capital, then all remaining non exception words Camel Case.

Though this works only for "the", but I guess I need to change all the 'general exceptions' list from a to A, on to On, etc., with no change on Exact match (i.e. case sensitive match..).

2MR2PostAugust 29, 2018, 15:26
Avatar photo
Administrator
Posts: 2083
Registered:
August 23, 2012, 19:27
Normal topicRe: lower-TitleCase with First capital?

well it's not really Camel Case as you want to preserve the spaces. You want Lower case, then Capitalize with the Title Case exceptions always capitalizing the first word. Phew.... It's pretty much what do did.

You can use the Title Case set without having to copy it to general exceptions. Try this:

Copy the Title field to Variable 1
Set Default Exception set to (Title Case)
Case lower in Variable 1
Case Capitalize in Variable 1 with exceptions
Substring [0, 1] of Variable 1 -> Variable 2
Case Capitalize in Variable 2
Substring [1, -1] of Variable 1 -> Variable 1
Prepend the Variable 2 field to Variable 1

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.029 seconds.