anonymous / gist:4237869
Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:4237869
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/ruby
require 'taglib'
 
Dir.foreach("/home/music/") do |filename|
# Load a file
TagLib::FileRef.open (filename) do |fileref|
tag = fileref.tag
File.rename ( "/home/music/#{filename}","/home/music/#{tag.title}-#{tag.artist}.mp3")
end
end # File is automatically closed at block end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.