Skip to content

Instantly share code, notes, and snippets.

@SalvadorP
Created February 8, 2017 10:15
Show Gist options
  • Save SalvadorP/2edfaca91e89fc87167b792f434e1c73 to your computer and use it in GitHub Desktop.
Save SalvadorP/2edfaca91e89fc87167b792f434e1c73 to your computer and use it in GitHub Desktop.
Unix CLI batch rename files
# 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
@SalvadorP
Copy link
Author

Credits for the stackoverflow user, I have the gist just to get the cli command faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment