Last active
July 12, 2017 21:12
-
-
Save aferriss/d544c28b6957f68771c1dd75aa96081c to your computer and use it in GitHub Desktop.
Batch Rename with Padded 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
| #just run from current directory | |
| # will rename all files to 00001.jpg 00002.jpg etc. | |
| ls | cat -n | while read n f; do mv "$f" `printf "%05d.jpg" $n`; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment