How to Change all File Names in a Directory to Lowercase
Jul 14, 2022 | Uncategorized
- Open the Terminal on Mac
- Type ‘cd’ and drag and drop the folder containing the files to be renamed into the window.
- To confirm you’re in the correct directory, type ‘ls’ and hit enter.
- Paste the following into the Terminal code and hit enter:
for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done
- To confirm that all your files are lowercased, type ‘ls’ and hit enter again.
How to Change all File Names in a Directory to Lowercase