Skip to content

Instantly share code, notes, and snippets.

@ruimarinho
Created August 4, 2016 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruimarinho/7f3e13a5856eda0cdad1276d4c25b46d to your computer and use it in GitHub Desktop.
Save ruimarinho/7f3e13a5856eda0cdad1276d4c25b46d to your computer and use it in GitHub Desktop.
Rename files using index sequence via the `rename` util
brew install rename
rename -g 's/\d{2}-/$N-/' -N 01 'dir/*.ext'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment