Selective case changing

Forcing lowercase file extensions

Say you have a folder of input files that need to be batch processed through a program, but this program is picky about only accepting files with lowercase extensions. Due to being copied from various different operating systems, the files have varying extension case:

We could solve this problem by using a filter to only display one extension at a time, then matching and replacing it with a lowercase version, but RegexRenamer provides an easier way: selective case changing.


Step 1: In RegexRenamer, browse to the folder containing the files (make sure the option Preserve file extension is unchecked).

CLICK TO ENLARGE

Step 2: In the Change Case menu, select Lowercase.

CLICK TO ENLARGE

Step 3: Change the default match pattern to: \.\w+$ (at the end of the line ($) match an actual dot (\.) followed by one or more (+) word characters (\w)).

CLICK TO ENLARGE

Note: We could have used a more complex match pattern (or regex filter) to just match the extensions containing uppercase characters (eg, \.\w*[A-Z]\w*$). However as you can see above, RegexRenamer will ignore files that result in the same filename, so the end result is the same.

Step 4: Click the Rename button to apply the changes.

CLICK TO ENLARGE

Now all the files have lowercase extensions: