Skip to content

Instantly share code, notes, and snippets.

@bwesterb
Created August 25, 2014 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bwesterb/cd32cfb563e9dff4c569 to your computer and use it in GitHub Desktop.
Save bwesterb/cd32cfb563e9dff4c569 to your computer and use it in GitHub Desktop.
voorbeeld voor J
Dir.entries('.').each do |old|
next if old.end_with? '.rb'
next if ['.', '..'].include? old
new = old.split('-', 2)[0].strip + '.flac'
File.rename(old, new)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment