HOWTO: Change Filenames to be Lowercase Using Bash

HOWTOs

I recently needed to convert all file names from something like this: IMG_3034.JPG to img_3034.jpg. I had a ton of these files and changing them manually was not something I wanted to do.

The solution was easy. I use Mac OS X – so in the terminal – I simply used:


for i in *; do mv "$i" "$(echo $i|tr A-Z a-z)"; done

That was it – all file names easily and quickly converted to using only lowercase letters. I hope this saves someone else time as well!

Leave a Reply

Your email address will not be published.
*
*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Life

Zelazny Money Clip

I grew up in a house where we used vice grips for just about everything. This is my latest use of my favorite tool.

Random

Busy Summer/Excuses

I realize I have been MIA for awhile now. I have been busy the last few months with travel, moving, and trying to organize daily life and work. I decided to kick it up a notch (literally) by starting kickboxing at Lionize Training Center and have really enjoyed that. The move went well and we […]