Ever found yourself staring at a folder full of files in ALL CAPS, thinking how much better they would look all in lowercase? Maybe it’s an OCD thing, or perhaps it's about keeping things consistent for a coding project. Whatever your reason, macOS has got you covered with a neat little Terminal trick that’s easy to pull off. No need for any fancy software—just a simple command.
First things first, pop open your Terminal. You can find it by searching in Spotlight (Command+Space) or by navigating through Applications > Utilities > Terminal.
Once you're in, you’ll need to move over to the folder where your SHOUTY files live. Use the cd command (stands for "change directory") to get there. Type cd followed by the path to your folder and hit Enter.
Now, for the magic part. Paste this command into the Terminal:
for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done fi
And press Enter. Voilà! Your files should now all be in lowercase, no sweat.
What this command does is loop through each file (for f in *
), rename it to add a temporary .tmp
extension (to avoid any naming conflicts), and then rename it again but this time converting all uppercase letters to lowercase. Neat, right?
There you go, a quick and dirty way to make your files a little less shouty and a bit more uniform. Your folder is now looking sleek and consistent, all thanks to a simple line of text. Welcome to the power of the Terminal!