Help help creating a csv.mte script

Looking at the example .mte scripts on this site don’t seem obvious to me, so can someone help me create a script that exports the csv file I need?

What I would like are the following fields:

Filename, title, artist, composer, album, comment, album artist, date modified, length (time), size, year, discnumber, track, genre, path.

Thanks for any assistance you can provide.

You could try:

$filename(New export file.csv,utf-8)
$loop(1)%_Filename%;%title%;%artist%;%composer%;%album%;%comment%;%albumartist%;%_file_mod_date%;%_length%;%_file_size%;%year%;%discnumber%;%track%;%genre%;%_path%
$loopend()

or

$filename(New export file.csv,utf-8)
$loop(1)%_Filename%$char(9)%title%$char(9)%artist%$char(9)%composer%$char(9)%album%$char(9)%comment%$char(9)%albumartist%$char(9)%_file_mod_date%$char(9)%_length%$char(9)%_file_size%$char(9)%year%$char(9)%discnumber%$char(9)%track%$char(9)%genre%$char(9)%_path%
$loopend()

I see you requested 4 items to be exported, but they did not show up in the .csv file: album artist, composer, disc number, comment. Also, the filename was the last column. Is there a way to make it the first column?

Thanks for your help

This is according to your specification:

I get all the data in the csv-text file. You would have to tweak your application to import the csv-file correctly.

That's interesting. My exported .csv file using that script shows those 4 fields are not included in that .csv file. I have included a few rows from that .csv file with the headings in an attachment:

Title;Artist;Album;Track;Year;Length;Size;Last Modified;Path;Filename;
Queencard;(G)i Dle;Now That's What I Call K POP;11;2023;160;4.18 MB;6/5/2024;D:\Music\Rock;(G)i Dle-Queencard.mp3;
(Shine Your) Light Love Hope (Morel's Pink Noise Mix) (excerpt);Bob Mould;Bob Mould - Body Of Song;7;2005;372;9.97 MB;6/12/2024;D:\Music\MP3 USB Music\Electronic - 2;(Shine Your) Light Love Hope (Morel's Pink Noise Mix) (excerpt).mp3;
(They Call Her) La Bamba;Crickets;Dreamboats And Petticoats - Summer Holidays;21;1964;171;4.92 MB;5/21/2025;D:\Music\MP3 USB Music\Oldies - 1;(They Call Her) La Bamba.mp3;
"Pro 1;00 db;Christopher Lawrence, John '00' Fleming - Global Trance Grooves Volume 1 Two Tribes;8;2009;538;8.10 MB;4/22/2022;D:\Music\Electronic;00 db-Pro 1.mp3;"

A screenshot of the extended tags dialogue, a copy of that what you used as export script would help.
So far I can only say that I have no problems to get all the data except for fields that cannot be found in files.
Starting with this data:

i get as output:
"Alone? Lonely;Taklamakan;Alex Azary; Ludwig Rehberg; Michael Kohlbecker;Ambient Diary.One;Ambient Stimmung;Sampler Ambient;23.06.2025;09:40;22,62 MB;1997;1;004;Ambient;C:\Users\me\Music\Ambient Diary.One - 2024\Sampler Ambient _ Ambient Diary.One _ 03 _ Taklamakan 18 _ Alone Lonely.mp3"
... which I think is correct.

I have include the csv.mte in the mp3tag export folder, the mp3tag.csv output file, the mp3tag display of the metadata for the 1st file that it processes, and the mp3tag display of the metadata for a music file with all requested export options (that it ignores).

Looking at those displays, it appears that the mp3tag export will exclude any requested export metadata options that doesn't appear in that first file it processes (even if requested), even if most of the remaining music files do have some or all of those metadata options.

Is that a feature, or a bug? (It sound like a bug, and hopefully not a feature.)




I do not know what you are doing but I get all the data as defined in the export script:

Sampler Ambient _ Ambient Diary.One _ 01 _ Al Jones _ I'm so happy(98a108 BPM);I'm so happy(98a108 BPM);Al Jones;Al Jones;Ambient Diary.One;Ambient Stimmung;Sampler Ambient;20.07.2025;10:06;23,24 MB;;;001;Ambient;C:\Users\Me\Music\Ambient Diary.One - 2024\Sampler Ambient _ Ambient Diary.One _ 01 _ Al Jones _ I'm so happy(98a108 BPM).mp3

Sampler ambient _ ambient Diary.One _ 01 _ Tom _ Song Titleeisch;Song Titleeisch 01/00;Infinity; Guru Josh; The Berlin Orchestra;Infinity; The Berlin Orchestra;ambient Diary.One;Ambient Stimmung;Sampler ambient;15.07.2025;07:45;18,21 MB;2025-02-19;1;002;Jazz;C:\Users\Me\Music\Ambient Diary.One - 2024\Sampler ambient _ ambient Diary.One _ 01 _ Tom _ Song Titleeisch.mp3

Sampler Ambient _ Ambient Diary.One _ 02 _ William PrimRose _ Breezer in (the) Green feat. You;Breezer in (the) Green feat. You;William PrimRose;Mike Knapp; Pino Grzybowsky;Ambient Diary.One;Ambient Stimmung;Sampler Ambient;23.06.2025;07:19;17,22 MB;1997;1;003;Ambient;C:\Users\Me\Music\Ambient Diary.One - 2024\Sampler Ambient _ Ambient Diary.One _ 02 _ William PrimRose _ Breezer in (the) Green feat. You.mp3

Sampler Ambient _ Ambient Diary.One _ 03 _ Taklamakan 18 _ Alone Lonely;Alone? Lonely;Taklamakan;Alex Azary; Ludwig Rehberg; Michael Kohlbecker;Ambient Diary.One;Ambient Stimmung;Sampler Ambient;23.06.2025;09:40;22,62 MB;1997;1;004;Ambient;C:\Users\Me\Music\Ambient Diary.One - 2024\Sampler Ambient _ Ambient Diary.One _ 03 _ Taklamakan 18 _ Alone Lonely.mp3

Sampler Ambient _ Ambient Diary.One _ 04 _ Saafi Brothers Sisters; Alex Azary; Gabriel Mastichidis; Michael Kohlbecker _ The Witnessient;A Witnessient;Saafi Brothers Sisters; Alex Azary; Gabriel Mastichidis; Michael Kohlbecker;Ädon; 柳 譲治; :edward; .audiosport; 3 Non Blondes; Alex Azary; Gabriel Mastichidis; Michael Kohlbecker;Ambient Diary.One;Ambient Stimmung;Sampler Ambient;23.06.2025;07:37;17,91 MB;1997;1;005;Ambient;C:\Users\Me\Music\Ambient Diary.One - 2024\Sampler Ambient _ Ambient Diary.One _ 04 _ Saafi Brothers Sisters; Alex Azary; Gabriel Mastichidis; Michael Kohlbecker _ The Witnessient.mp3

Just a hint: %length% is a field without any significance to the true length of a file. If you want to get the information from the header, you have to use %_length%.

I don't know what you mean by that and if it is the right way.
The working way I know:

  • Select all the files for which you want to execute the export script.
  • Copy the suggestion for the export script from this forum
  • Press Ctrl-E to open the list of export scripts,
  • Click on the New button.
  • Enter a name for the export script
  • Select all the text in the editor and paste the contents of the clipboard to overwrite all of the sample text.
  • Save the text,
  • close the text editor
  • Click OK to execute the export script.

the result should be similar to what I showed in the previous post.