The ID3 tag and C++

I have close to 140 GB of music, all mp3’s. From time to time I get stuck with file names which make no sense. The title and tag info is there, but not the file name. Since this is windows, I can’t just run a perl / bash command. Instead I wrote about 400 lines of classy C++ to go through each file in a directory based on a search term and rename the files based on their ID3 tag:



int HowDoYouWantIt()
{
int selection;
lolwut:
cout << "How do you want your files named?\r\n" ;
cout << "1. &lt;Artist&gt; - &lt;Title&gt; (default)\r\n";
cout << "2. &lt;Artist&gt; - &lt;Title&gt; &lt;Album&gt;\r\n";
cout << "3. &lt;Artist&gt; - &lt;Album&gt; - &lt;Year&gt;\r\n";
cout << "4. &lt;Album&gt; - &lt;Title&gt;\r\n";
cout << "5. &lt;Title&gt; - &lt;Year&gt;\r\n";
cout << "6. &lt;Title&gt;\r\n";
cin >> selection;

This is proof that I’m not all hax. I code too.

See it here

MassMp3rename_sauce

Leave a Reply