Skip to content

Instantly share code, notes, and snippets.

@anthonysousa
anthonysousa / rename-multiple-files.md
Last active April 4, 2024 20:13
Rename multiple files on Mac Terminal to lowercase and replace the spaces

First, make sure you are on the right directory on mac terminal app.

If you want to change only jpg files you can use $ for f in *.JPG; instead of $ for f in *;

Renaming to lowercase

$ for f in *; do mv "$f" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done

Replacing spaces in file names to hyphens