Last active
December 15, 2016 20:35
-
-
Save jsaund/4875e04795ac02e874a48a0e3010d06e to your computer and use it in GitHub Desktop.
Simple batch rename files in folder to a specific format with leading zeros
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 | |
| COUNT=0 | |
| RENAME_FILE="enter_new_filename_%02d.png" | |
| for FILE in *.png; do | |
| mv "$FILE" $(printf $RENAME_FILE $COUNT) | |
| let COUNT=COUNT+1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment