Need to export a csv file of a list of songs!

I've done this dozens of times on another PC but I can't figure out how to write a new export script to do this on a new laptop that I have here. I'm not in my home office, but I have to get this done right away. I'm panicked, as I need to upload the CSV file now.

I know there's a sample script in the export list of ready-made scripts, but I can't get it to work. I have a list of 46 songs with track number, duration, artist, title, album name, year released and label. It's a total of 47 records including the header row. I need to get it into an Excel file so that I can upload it to a web-based site.

What do you mean? You don't know how to export? -> Select the files, select the export script, execute the script, done.

Or you get strange results in some fields as the included data contains commas and/or semikolons?
Anyway: show us the script that you use and tell us which fields you want to export.
Here is a very plain export script that uses the tab character as field separator - usually works better than commas:
$filename(csv,utf-16)Interpret$char(9)Composer$char(9)Album$char(9)Pfad $loop(%artist%)%artist%$char(9)%composer%$char(9)%album%$char(9)%title%$char(9)%_path%

I don't understand the portion of text in the middle row above. What is Pfad and why does %artist% appear twice?

Here is the script I've been trying. I modeled it after the CSV example script.


The $loop() statement defines by which field the whole export should be sorted (in this case by the field %artist%)
That what is outside the $loop() is the instruction to output the contents of the referenced field. So you have to use %artist% to sort by artist and use %artist% to see what is in the field artist.
The $char(9) is the character code for the tab character which works well as field separator

I think that should be %track% instead of %tracknumber%

These are flac files, The field name for the track number is tracknumber.

so, what is it that does not work?

and what is "Pfad" in the script?

The script runs but the Excel file that opens has strange numeric characters at the beginning of each line, and the field values are not separated into column. Some fields are missing as well.

Also, the rows in the spreadsheet are in random order rather than in the order listed in the mp3tag rows.

If you sort by path and the path is the same for all, the you get a random order.
$loop(1) instead of $loop(%_path%)
This copies the order that is shown in the files list.

This depends on what you local excel interprets as "comma": whether it is really a comma or the semicolon.
Currently, you use the semicolon, perhaps the comma is better (but this will be problematic if the data in the fields contains commas as well. THen you would have to enclose the field names in ").

I have a working script on the computer in my home office, but that's 50km from here, it's night time and I cannot drive at night. I just can't duplicate it here.

I use another script successfully here to export a text tile. I was smart enough to store that one in my dropbox. Here it is:


$loop(%_path%)$num(%tracknumber%,2) / %length% / %artist% / %title% / %album% / %year% / %label%


It yields a very nice double-spaced, easily read list of the songs that I also need to upload/import as a csv file (minus the spaces and "/" characters. As I recall, my working CSV script on the other PC looks very similar to this one.

ecxept of course the fields are not double-spaced.

What is wrong with this csv export script?


I know about the need for "s if there are commas in the values.

I get proper results when I use a valid separator and the field %_length%.
If you don't, then you would have to show us the original data, the actual output and the intended output.

That script worked for me. Thank you for all of the time and effort you put in to helping me! I really appreciate it.

Dennis, aka "d2b"

We create a FLAC tag with the name LENGTH from %_length%.