Skip to content

Instantly share code, notes, and snippets.

@wwqrd
Created June 3, 2014 16:52
Show Gist options
  • Save wwqrd/801c2670ac4625d70387 to your computer and use it in GitHub Desktop.
Save wwqrd/801c2670ac4625d70387 to your computer and use it in GitHub Desktop.
rename with regex
Dir['source/stylesheets/*.less'].each { |x| File.rename(x, x.gsub(/source\/stylesheets\/(.*)\.less/, "source/stylesheets/_\\1.\less")) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment