Change file extensions from uppercase to lowercase in Mac OS X

2

1

I'm copying files from my Nikon camera to my iMac several times each week using Nikon Transfer 2 which changes the file name but keeps the uppercase extension.

I spend a lot of time changing 100'ds of files from .NEF to .nef or .JPG to .jpg. I can't do batch processing in Finder so I have to change all the file extensions one by one. Is there any easy way I can do this?

user375490

Posted 2014-10-05T13:47:13.917

Reputation:

Answers

2

Open Terminal.app, and use cd to navigate to the folder with the images. To do that, type cd, a space, and drag your folder onto Terminal. Then press Enter

Now, copy and paste this:

shopt -s globstar
for f in **/*.NEF; do mv -- "$f" "${f%.NEF}.nef"; done

This will make all .NEF extensions lowercase, and it will do so recursively.

slhck

Posted 2014-10-05T13:47:13.917

Reputation: 182 472

shopt -s globstar don't work on OSX by default. You can make it work by installing bash 4 with homebrew, as described here : http://mistermorris.com/blog/get-yourself-globstar-bash-4-for-your-mac-terminal/

– Laurent Jégou – 2015-03-24T13:04:04.093

You're right, I should add this. – slhck – 2015-03-24T15:30:54.353

0

Try Renamer [edit - oops, is not freeware] or NameChanger [donationware]

[Source 3 Ways to batch rename files on Mac]

Tetsujin

Posted 2014-10-05T13:47:13.917

Reputation: 22 456