Skip to content

Instantly share code, notes, and snippets.

@branquito
Created September 18, 2013 21:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save branquito/6615974 to your computer and use it in GitHub Desktop.
Save branquito/6615974 to your computer and use it in GitHub Desktop.
commander regex multi rename files example

##file multi rename, regex pattern for commander


Search For : -(\d*)([-.]\w*.\w*)

Replace With : -${1}000${2}

sample, with the above 3 zeros appending on a number after dash(-):


96672-1478.jpg" -> "96672-1478000.jpg"
96672-1478-home.jpg" -> "96672-1478000-home.jpg"
96672-1478-large.jpg" -> "96672-1478000-large.jpg"
96672-1478-medium.jpg" -> "96672-1478000-medium.jpg"
96672-1478-small.jpg" -> "96672-1478000-small.jpg"
96672-1478-thickbox.jpg" -> "96672-1478000-thickbox.jpg"

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