recursive batch rename files

I have audio library that has artworks in every folder and the names are: Cover.PNG, Cover.png, Cover.JPEG, Cover.jpeg, Cover.JPG, Cover.jpg…

How to recursively find all those files and rename them all to cover.png, cover.jpg?

Looking for command line way to do it.


Posted before the command line addendum

Assuming you can get them all in a single path, then you can do it in 3 passes using the Finder's own Rename utility.

Using a small example set, variations of cover.png, open the top level of your hierarchy in list view.
Option/click the top level will open the entire hierarchy inside it…
(I made this pic last, as I forgot to include this step)

enter image description here

Cmd ⌘ A to select all

enter image description here

Right click the selection & in the drop menu, select Rename nnn Items

enter image description here

enter image description here

In the window that opens, select Replace Text, then type your existing case-insensitive name.
Type a Case-sensitive replacement [first time use png, 2nd use jpg - you'll probably need a third pass to pick up strays like jpeg]
Hit Rename.

enter image description here

Repeat for jpg & jpeg.
You don't need to change your selection as it will only change matching names.

It's probably quicker to do 3 passes like this than it is to set up complex rename rules in a 'smarter' app.


If you are comfortable at the command line, open terminal:

Application -> Utilities -> Terminal

Then run a command like this:

find . -type f -name Cover.jpg -execdir mv {} cover.jpg \;

Where:

find . -type f -name <old> -execdir mv {} <new_name> \;

Do this for each file you want to rename.