Created
August 24, 2011 07:24
-
-
Save bensonk/1167484 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env python | |
| import ID3, os | |
| for fname in [ x for x in os.listdir(".") if x.lower().endswith(".mp3") ]: | |
| print "handling: %s" % fname | |
| tag = ID3.ID3(fname) | |
| new_name = "%0.2d %s.mp3" % (tag.track, tag.title) | |
| if fname and tag and new_name: | |
| os.rename(fname, new_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment