Created
August 25, 2017 15:02
-
-
Save danielmorgan/d51fa3cddec8d1eeb3d23894c4291970 to your computer and use it in GitHub Desktop.
Rename all photos sequentially (a = starting number)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| a=0 | |
| for i in *.JPG; do | |
| new=$(printf "%04d.jpg" "$a") | |
| mv -i -- "$i" "$new" | |
| let a=a+1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment