Skip to content

Instantly share code, notes, and snippets.

@canabady
Last active March 6, 2018 04:26
Show Gist options
  • Save canabady/a28fe1e1359dcc5d9d12aa060557ced7 to your computer and use it in GitHub Desktop.
Save canabady/a28fe1e1359dcc5d9d12aa060557ced7 to your computer and use it in GitHub Desktop.
To bulk rename files with increment or decrement
To bulk rename files with increment or decrement
================================================
e.g.
song_002.mp3
song_003.mp3
...
song_011.mp3
To rename above file list to:
song_101.mp3
song_102.mp3
...
song_110.mp3
Use cmd:
$ rename 's/(\d+)/$1+99/e' *.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment