Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using Batch Rename to change filenames to Title Case

Explorer ,
Mar 07, 2019 Mar 07, 2019

Hi there,

Can anyone help me with a script to change filenames from:

SURNAME Firstname.psd

to

Surname Firstname.psd

Thanks for any help.

TOPICS
Scripting
3.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 08, 2019 Mar 08, 2019

Unless you need to incorporate the rename into another script, you don’t need scripting to do this, the standard Batch Rename tool is more than capable!

The following is just the first method that I came up with… I am hoping to come up with a more elegant solution.

I tried to make it robust so that it would work with any combination of uppercase/lowercase patterns.

BatchRenameTitleCase.png

Translate
Community Expert ,
Mar 08, 2019 Mar 08, 2019

Unless you need to incorporate the rename into another script, you don’t need scripting to do this, the standard Batch Rename tool is more than capable!

The following is just the first method that I came up with… I am hoping to come up with a more elegant solution.

I tried to make it robust so that it would work with any combination of uppercase/lowercase patterns.

BatchRenameTitleCase.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2019 Mar 08, 2019

Extending the previous method, this one adds an extra step to swap the order around from Surname Firstname to Firstname Surname.

BatchRenameTitleCase-SWAP-ORDER.png

NOTE: I have not made this workable with names such as McDonald Ronald, which would end up as Ronald Mcdonald so take care. Same goes for 3 word names, hyphenated names etc. You need to know your own data.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 11, 2019 Mar 11, 2019

Ha. Yes. This is exactly an issue for me (and same for all the O'Names as well), but in my case it's simple enough for me to correct these ones by hand.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 16, 2025 Apr 16, 2025

please can you share the expressions as text therefore i can copy and paste this? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2025 Apr 16, 2025

@martinj54220288 

 

I don't understand your issue? The script is at the previous link...Or are you referring to the Batch Rename regular expressions used in the screenshot in my other topic reply?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2025 Apr 17, 2025

Batch Rename regular expressions, thanks. 
I'm trying to replicate this in bridge. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2025 Apr 17, 2025
LATEST

@martinj54220288 

 

Scripts are more flexible and better suited to the task, so my preference is the Bridge script previously linked. I created the Batch Rename regex before creating the script.

 

The following example is only for 2 words (originally for simple name case), notice in the screenshot how the third word isn't in Title Case. You would need to change the regex for 3 or more words, and it would become even more unwieldy.

 

Current Filename Find:

 

(^\w)(?:.+?\s)(\w)(?:.+?$)

 

Current Filename Replace

 

$1$2

 

Intermediate String Substitution Find:

 

(^\w)(\w)(?:\w)(\w+)(?: )(\w)

 

Intermediate String Substitution Replace:

 

$1$3 $2

 

2025-04-17_20-36-13.pngexpand image

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 11, 2019 Mar 11, 2019

Thanks Stephen. This worked perfectly. I've since discovered I can use Automator to achieve the same result, but it's nice to be able to stay in Bridge. Although I still can't believe they don't include this as an option. Thanks again!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 11, 2019 Mar 11, 2019

Agreed, it should be a standard option along with original/upper/lowercase. Sadly when it comes to Bridge, there are many things that are hard to believe.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 26, 2023 Dec 26, 2023
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines