mp3Tag

Import Tags from a Text File

mp3Tag
  • Download and edit MP3 tags
  • Rename MP3 files
  • Create playlists

Download Buy now

mp3Tag can download missing tag info from FreeDB and Amazon. Alternatively, it can generate tags from filenames and folder names.

But if you have a considerable database of tag info in some text file (like CSV file), you will find this feature quite valuable. As most applications (MS Excel, MS Access etc.) can export information into text files, the feature may be used virtually with every database.

CSV file is a simple text file that follows simple rules. Values in it can be separated by tabs, commas, or by semicolons. A typical CSV file looks like:

filename;title;artist;album;year;genre;comment;

mp3Tag is able to process such files.

Suppose that you have a bunch of files named like:

01.mp3
02.mp3
etc.

Information about the files is saved in a text file that looks like:

01.mp3;Kylie Minogue;Wow
02.mp3;Britney Spears;Piece of Me
etc.

You can easily import the information to the otherwise unrecognizable files. First, select the files in mp3Tag. Click "Generate tags":

Generate tags

Select "Tags from textfile" tab:

Before entering the correct format string

Type the path to your text file in the "Textfile" field, or use the browse button to find it.

As next, type the correct format into the format string. To extract the above given information, we will need the following format:

%O;%A;%T

And here is what we instantly see:

After entering the correct format string

The first variable '%O' means 'filename' (formerly 'Old filename'). '%A' means 'Artist', '%T' stands for 'Title".

The format string depends on the order of values in the text file. If the values were placed like:

01.mp3;Wow;Kylie Minogue

we would use another format string:

%O;%T;%A

Of course, all the other usual variables are also allowed.

If your text file uses commas instead of semicolons to separate values, you should use the also in the format string. If your file is tab-separated, use \t in the format string instead of tabs.

You can import tags for files from multiple folders.

If your CSV file doesn't contain right filenames, but otherwise is completely correct, you can do the following:

  1. Select the files that you want to tag from the text file. Export information from them to a CSV file (their filenames will be exported, which is important for us).
  2. Open the exported file in some spreadsheet application, like MS Excel.
  3. Copy the column with the filenames.
  4. Open your file with tags in the spreadsheet application (the file that you want to import tags from).
  5. Replace or insert the column with filenames from the exported file.
  6. Save the file. Proceed with tagging, like described above.

Together with the exporting feature you can use import to backup/restore your tags, to transfer tags from one set of files to another etc.