0 votes

I would like to find file names written in uppercase in order to drag them to my Renamer program and change them in title case.

Is there a way to do this, maybe some Regular Expression?

by (260 points)

1 Answer

0 votes

Yes, as you suspect a simple RegEx will sort you out. Just check the 'Match case' button next to the File name field and search for:

^[A-Z ]+\.

For example:

Match Case

This will search for any file names that include only UPPER CASE characters.


Breaking down the expression:

^            - Matches the start of the file name
[A-Z ]+      - Matches one or more characters in the range A-Z or a space
\.           - Matches the period, i.e. the bit before the extension

If you want to search for file names with ALL characters upper case, including the extension, you could try:

^[A-Z .]+$

the $ symbol matches the end of the file name.

by (83.2k points)
Thank you, this program can really do a lot of things but you have to know how ;-)
I have tried the given RegEx and it finds everything that starts with uppercase. When I remove the ^ at the beginning, it finds all things with uppercase in it, but not ONLY uppercase. Anyway it is helping.
I manage with RegEx stuff for the more simple things. So I appreciate your help for the less obvious things.
I've elaborated a little on what the expression means. Regex is great but it can get a little confusing.
Thank you for breaking it down.
It works, I have tried it:
(with MatchCase button pressed down/pushed in)

^[A-Z ]+\.     finds:  ABCDE fghij klm NOPQRS tuvw
^[A-Z .]+$    finds:  ABCDEF GHIJ KLMN OPQR

that is a big help, I'm only missing some expression to find
                              abcde FGHI jklmn OPQRS tuv
Sorry, I don't understand. What are you stuck trying to find? If you just want to find ANY upper case character remove the anchors (e.g. ^ and $).
...