Skip to content

Instantly share code, notes, and snippets.

@levey
Created April 8, 2013 03:46
Show Gist options
  • Save levey/5334107 to your computer and use it in GitHub Desktop.
Save levey/5334107 to your computer and use it in GitHub Desktop.
Replace MP3 title tag to file name
require 'rubygems'
require 'mp3info'
ext = ".mp3"
Dir.entries("./").select { |f|
if File.extname(f) == ext
title = File.basename(f, ext)
Mp3Info.open(f) do |mp3|
mp3.tag.title = title
end
puts "Updated TITLE of " + f
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment