Retagging audio tracks based on filename
by bigpresh on Jan.31, 2009, under Perl, Programming
I had some audio tracks which weren’t tagged, but did have filenames containing the artist, title etc, so I whipped up a quick Perl script to sort them out – retag-by-filename.pl.
It takes a regular expression with named captures for track, title, artist and comment, and sets the tgs on the file as appropriate.
It makes use of Music::Tag to do the actual tagging and Getopt::Lucid to read the options supplied, and requires Perl 5.10.0 for named regex captures (and ‘say’).
A --dry-run option allows you to check that the filenames are being parsed correctly by your regex before actually writing tags.
See retag-by-filename.pl for the full details.
February 3rd, 2009 on 10:34 am
Well I have so many mp3 files than now I do not care about them. I just select my favourite ones and store them in some different folder and use them and whenever I format my machine I never took those folders except my favourite ones.
Managing music files is really a waste of time. But thanks to you that you have got the solution for this.
February 10th, 2009 on 4:04 pm
yup, so many music files is quite headache, better only keep those that you like and delete off all those you seldom listen one.
March 10th, 2009 on 2:29 am
I have many mp3 file, it is hard to arrange or format. some I want to listen anymore, some I want to delete. when I format them, all of them will be lost from my mp3 play station
March 10th, 2009 on 9:32 am
Old files are really burden to me. I am not able to delete them as I think that this can have some useful data and storing them and looking at them is always waste of time.
I am planning to buy an external hard disk and will save these unwanted music files and other files at there.
What do you think ?
May 1st, 2009 on 2:46 pm
@”River Plac Austin TX” – space isn’t the issue, properly tagged files are.
Disc space is so cheap these days, there’s no need to delete anything that you’d rather keep :)