Skip to content

Instantly share code, notes, and snippets.

@HerbFargus
Created April 8, 2022 22:49
Show Gist options
  • Save HerbFargus/f1741e1862189f140ccf2ae51a585797 to your computer and use it in GitHub Desktop.
Save HerbFargus/f1741e1862189f140ccf2ae51a585797 to your computer and use it in GitHub Desktop.
rename all integers with padded 0 eg 1-4-5.jpg to 01-04-05.jpg
rename 's/\d+/sprintf("%02d",$&)/ge' *.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment