Help with Export Configuration

Hi,

I'm very new to MP3 Tag and am really enjoying it so far - so much more flexible than other programmes I have looked at. However, I have hit a brick wall with the Export Configuration and have spent the whole day trying to work this out to no avail (a programmer I am not!)...

What I'm trying to do is create a personalised Export Configuration to include some new Custom field as well as standard fields not already included in the basic templates.

If I take the csv Export template, which is:

$filename(csv,utf-16)Title;Artist;Album;Track;Year;Length;Size;Last Modified;Path;Filename;
$loop(%_filename_ext%)%title%;%artist%;%album%;%track%;%year%;%_length_seconds%;%_file_size%;%_file_mod_date%;%_folderpath%;%_filename_ext%;
$loopend()build on %_date% with %_app% - the universal Tag editor - http://www.mp3tag.de/en/

and create a new template and add just one new field for ISRC to create the following command:

$filename(csv,utf-16)Title;Artist;Album;Track;Year;Length;Size;Last Modified;Path;Filename;ISRC
$loop(%_filename_ext%)%title%;%artist%;%album%;%track%;%year%;%_length_seconds%;%_file_size%;%_file_mod_date%;%_folderpath%;%_filename_ext%;%isrc%,
$loopend()build on %_date% with %_app% - the universal Tag editor - http://www.mp3tag.de/en/

When I run the new template I get the following error message:

"$filename only allowed at the beginning of export configuration"

The weird thing is if I then go back and re-edit my new template to be the same as the original programme eplate file, I get the same error message…

All help very grateful appreciated as it is driving me crazy...

Thanks,

Mark

This works OK over here.
Is this an accurate copy or did you insert somewhere a $filename instead of a plain Filename or %_filename_ext%?

1 Like

WOW - thanks for getting back to me so quickly...

This is an accurate copy of the code from the mte file...

I have just noticed something though - the is a , instead of a ; after %isrc% - let me try see what happens if I change this...

Just tried changing the , to ; and no help I'm afraid...

This is the output I get for a single file:
Title;Artist;Album;Track;Year;Length;Size;Last Modified;Path;Filename;ISRC
Sky never die;Fresh Moods;Ambient Diary.One;002;1997;465;17,79 MB;19.10.2019;C:\Music\Ambient Diary.One - 1997;Ambient Diary.One _ 002 _

looks OK to me

1 Like

Still not working for me - I've tried moving the file source folder to the desktop to simplify the path, moved the ISRC field into the middle, tried using a standard field (Comment) instead of the custom ISRC field - completely baffled???

The weirdest thing is if I then go back and copy and paste the template code into my newly created template so they are exactly the same, when I try and run my new template I still get the same error message, which is:

$filename only allowed at the beginning of export configuration

Instead of copying and pasting code to the forum, upload the complete MTE file for the export that fails, found here: "%APPDATA%\Mp3tag\export\Your Failed Export.mte"

2 Likes

OK -thanks for your help...

The file that works is "csv"
The file that doesn't work is "csvtest"

As you will see they are now both exactly the same as I have copied and pasted the data from "csv" into "csvtest". I can run "csv" with no problem but "csvtest" gives me the error message

$filename only allowed at the beginning of export configuration

csv.mte (327 Bytes) csvtest.mte (331 Bytes)

PS Using PC running Windows 10 with Office 365

No, they are not exactly the same.
The first line of csvtest.mte has double quotes around the first line: csv.mte does not.

2 Likes

Hi,

I'm sorry but I don't understan =d as the first line/cell still look the exact same to me and this is what I see:

csv
$filename(csv,utf-16)Title;Artist;Album;Track;Year;Length;Size;Last Modified;Path;Filename;

csvtest
$filename(csv,utf-16)Title;Artist;Album;Track;Year;Length;Size;Last Modified;Path;Filename;

Can you be kind enough to please point out to me where the double quotes are?

Many thanks,

Mark

Here is what I see when "csvtest.mte" is opened with Notepad:

1 Like

Thanks so much, that's really helpful - let me investigate

@ryerman - once again thank you so so much - I have edited the Notepad code to remove the quotation marks and it now works fine. I didn't think to look into opening with Notepad and will remember that for the future. Tomorrow I will try and work out why/how the quotation marks got into the code and repost back as this might help others.

Thanks again - I really appreciated it!

1 Like

That means that you have set a different editor for plain text documents. MP3tag does not do anything but call the default plain text editor when you click on "new" or "Edit" in the export configuration dialogue.

1 Like

@ohreniko - thanks very much - I must have reset this the first time I opened the document as I checked and Notepad is set as my default plain text editor?? I will remember to keep an eye on this in the future.

I have one more question please? When I save the data, how do I specify the file extension for the data file please?

Many thanks for your help - it is really appreciated!

See the help on Export:
http://help.mp3tag.de/options_export.html#syntax

1 Like

@ohrenkino - that's great - thanks very much!