Created
February 8, 2017 10:15
-
-
Save SalvadorP/2edfaca91e89fc87167b792f434e1c73 to your computer and use it in GitHub Desktop.
Unix CLI batch rename files
This file contains 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
# https://stackoverflow.com/questions/3211595/renaming-files-in-a-folder-to-sequential-numbers/34153342#34153342 | |
ls | cat -n | while read n f; do mv "$f" "$n.extension"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credits for the stackoverflow user, I have the gist just to get the cli command faster.