Text file - Tag

I'm trying to help someone using Mp3tag to update tags from a file. He has the data in an Excel spreadsheet and he created a CSV file. Here's a sample:

SF001,1,Straight Up,Paula Abdul
SF001,2,Faith,George Michael
SF001,3,White Wedding,Billy Idol

The first field is the folder name so I told him to use the following format string:


But the error he's getting is "File ... cannot be opened for reading." I downloaded and tested the file and it worked fine for me so I'm not sure what's wrong.

What would cause that error?

Perhaps the Excel export CSV file ...
... has a BOM marker at the beginning of the file?
... has a header line?
... is not a plain text file?

It is recommended to write also the complete path to the music file into each line to the CSV file to help Mp3tag to find the related musicfile, for example:

SF001,1,Straight Up,Paula Abdul,"X:\ANY FOLDER\SF001\FILE 2.MP3"
SF001,2,Faith,George Michael,"X:\ANY FOLDER\SF001\FILE 3.MP3"
SF001,3,White Wedding,Billy Idol,"X:\ANY FOLDER\SF001\FILE 1.MP3"

Related format string:


Thanks for the reply.

No there's no BOM marker, no header line and it's a regular ANSI text file.

I have no problem reading and using the file, but there must be something the way his PC is configured that won't let him even open the file.

This message can occur when the file is already opened by another application in read deny mode. Possibly Excel is still open and locks the csv file?


OK. it looks like he's reading the file, but now he's getting this:

"C:\edit\disc 001\SF-00101.mp3" ->
"C:\edit\disc 001\SF-00102.mp3" ->
"C:\edit\disc 001\SF-00103.mp3" ->
Cannot parse line 1.
Cannot parse line 2.
Cannot parse line 3.

So what was the cause for the "cannot be opened for reading" message?

It seems so that the field structure of the CSV line does not match to the pattern in the format string.

For me ... this CSV file ...

SF001,1,Straight Up,Paula Abdul,"D:\TEST CSV\Test1.mp3"
SF001,2,Faith,George Michael,"D:\TEST CSV\Test2.mp3"
SF001,3,White Wedding,Billy Idol,"D:\TEST CSV\Test3.mp3"

... works with this format string ...


Be honest, it is not HE, but it is YOU.


Yes, I also have no problem with the CSV file.

No, I've been a computer programmer for over 20 years, I wouldn't make a rookie mistake.

Here's the thread, my username is stantley and I'm trying to help miger.


Tell "miger" to log in here into the Mp3tag forum, there might be other users willing to help on basic user level.

There are several different methods around here on the board to construct a save line format of CSV/SSV/TSV or such other delimiter character.
I like to use a pipe symbol as delimiter and double quotes to enclose literals.
Others like the star symbol as delimiter, because the star symbol is a forbidden character on file system paths.

Take into account, that the excel setup and understanding of what is CSV and what is the delimiter is system language dependent.

Wikipedia has good info about CSV:

See also:
CSV output
[LP] CSV export fails on value containing semicolon
character set von csv
Export CSV
Import tags from text file


... and by the way .. it looks like that your pupil cannot work with Excel. He does not know how to save the excel worksheet as other format.
He tries to simulate CSV by inserting new columns into the worksheet, which cells contain the delimiter character. Therefore it is possible that he creates much more fields in the export line and runs into trouble over trouble.
Tell him to use simple notepad and guide him to reach the goal basically with one correct formatted CSV line.
If he got one line working, then millions of lines will work.


screen 2.bmp shows that miger has a flawed format string that misses a % before artist%

DetlevD, thank you for the information I'll have miger look at this and post here if he has questions.

dano, thank you, I completely missed that, that's probably the problem.

Hi all, I've registered to try to help sort my problem out.
I admit i'm a real novice with Excel and i'll now read the links posted on CSV files to learn more.
I'd like to point out that Stanman has gone out of his way to help me with this and i now want to work this out as much for his sake as mine.
I thought DetlevD,that you came across as a little condescending to Stanman who is after all,only trying to help me with his PC knowledge, but of course i'm sure you didn't mean to do so. You are both obviously experienced programmers while i'm a complete novice.
Anyway, i'm grateful for everyone's input : :slight_smile:

By the way, the "cannot be opened for reading" message was because i had Excel open!