Created
April 8, 2013 03:46
-
-
Save levey/5334107 to your computer and use it in GitHub Desktop.
Replace MP3 title tag to file name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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