Skip to content

Instantly share code, notes, and snippets.

@foo9
Created March 1, 2014 13:56
Show Gist options
  • Save foo9/9290071 to your computer and use it in GitHub Desktop.
Save foo9/9290071 to your computer and use it in GitHub Desktop.
filenames = Dir.glob("*.png")
filenames.each do |filename|
name = filename.gsub('_', '_0')
p name
File.rename(filename, name)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment