Renaming Holiday Photos with a Bash Loop
These examples rename every photo in one folder. Try them on a copy first. Open a terminal in the photo folder before you start.
Example One: Date Prefix
for f in *.jpg; do mv "$f" "2026-08-$f"; done
Example Two: Lowercase Names
for f in *.JPG; do mv "$f" "$(echo "$f" | tr 'A-Z' 'a-z')"; done
Example Three: Number the Files
n=1
for f in *.jpg; do mv "$f" "photo-$n.jpg"; n=$((n + 1)); done
## Wrap Up
Run each loop in a test folder first so you can check the new names before touching the originals.