Text files to tags

I have problems with importing csv, html and txt files which seems to be rather common. After reading a large number of post, I still have no solution. This is driving me nuts. (In the past, I have managed to write some Microsoft Access code that worked.)

In the main mp3tag view, I have the following columns.

Filename, artist, album, track, disc, albumartist, title, path

After export to csv and importing to a new Excel document, the columns are these.

Title, artist, Album, track, year, length, size, last modified, path, filename

After making changes, the following columns remain. I have left the last two columns untouched and have tried saving as csv or html files.

Title, artist, album, path, filename

I have made many attempts to write an adequate format string. The last four I have tried are these.

%title%|%artist|%album%|%path%|%filename%

%title%|%artist|%album%|%_filename_ext%|%filename%

%title%|%artist|%album%|%path%

%title%|%artist|%album%|%_filename_ext%

What about a delimiter at the end of a format string?

In very few cases, some information was imported, though appearing in the wrong columns. The most common result is ”Can’t parse line … ”. (This is quite common in other posts.) One result was that the app couldn’t understand any of the lines in the csv file (the message was in Swedish).

I have tried semicolon as a separator/delimiter, to no avail. I have changed the default delimiter in Windows 10. This doesn’t seem to take effect in mp3tag. In txt files, blank spaces, tabs or ” – ” are the only delimiters. As the ”-”- sign appears sometimes in the information itself, mp3tag gets confused. It seems in Excel, when saving, that there are several versions of csv, html and txt files.

I have tried txt files with BOM and without it, not being sure if BOM is necessary from version 2.91 onwards.

What should I do now?

Just a note: it is always %_path%, %_filename% and %_filename_ext% - please note the underscore.

I think there are the following steps:

  • export the data from Excel to a text file. Use the option to export to a tab-separated text file.
    This makes sure that any comma or semicolon that may be part of the data does not mess up the field count.
  • Use a suitable text processor that can replace the tab with another, printable character (e.g. =)
  • Save the text file with the new separator (e.g. =)
  • Call the function Convert>Text file-tag
  • Enter as field list:
    %title%=%artist=%album%=%dummy%=%_filename_ext%

Florian and Ohrenkino, thank you so much! Problem solved.

One last question, admittedly of little importance IRL: When the column header is Last Modified, what is the string operator?

I understand now that the problem was about correspondence between column headers and operators in the format string. And about the underscore for column headers Path and Filename.

It is very convenient to use %_filename_ext% when the text file and the music files are in the same folder.

Sometimes they are not. For example, music files which I want to batch edit can be in the same folder but divided into subfolders. If I have got it right this time, the operators %_path%;%_filename% would be appropriate.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.