Don't Know How to Use Export Configuration

Hello. I have mp3s with comments, and I'm trying to follow the instructions given here:

Here's what I did:

I copied and pasted the code given in the thread, pasted it to a text file, called it "playlist.mte", and then copied it to export directory of the MP3tag program files folder.

From there, I don't know what to do next. I tried F1 and couldn't figure out the docs.

Thanks for the help.

Select the files from which you want export data
Open File>Export ... Ctrl-E
Select the export script from list of scripts,
Click OK.
The export will be executed for the selected files.

Or click on the Export Icon in the Toolbar
image

Sorry, I don't know if I got this right. I copy the code in the page and create playlist.mte. Then I copy the file to %appdata%\Mp3tag\export. After that, I run MP3tag, select the MP3s, run file - export, and then select "playlist". Is that right?

For some reason, it simply creates a file called playlist.html.

I did not comment on whether it is sensible to use that particular code as it produces a batch file which in return has to be executed.
The export script in question also relies on a lot of pre-conditions.

Wouldn't it be much easier to create a playlist with
File>Generate Playlist ...
?

To create an export file: Yes.

However, it does not say anything about whether or not you have also completed the five additional necessary steps relating to this export script.
This script is not meant to copy & run.
Several steps and preconditions need to be met first and the additional batch file needs to be executed manually.
Please follow the instructions for this special export script step by step.

Or maybe follow ohrenkinos advice

I generated playlists in the past by filtering each comment keyword and then making one, but I have something like 25 playlists, and each time I make changes in the MP3s (e.g., some of them were not labeled correctly, or I want to add some more, etc.) then I have to regenerate several of them.

I thought that there might be a script that would automate things, and I found this one. But I'm not sure if I got the process right. It appears that all I have to do is to put the export file in the export folder in appdata. It's just that it's mentioned in one line not in the docs

but in a page linked by it:

Finally, I looked at the instructions, and there are six steps, but I already have keywords in the comment separated by a blank space. All I have to do is to do the export command, but it looks like the script doesn't work.

If you have questions about a special export script, please add them to the thread with that script.
Otherwise, I have the impression, the context is lost.

  • The Export Configuration should look something like the picture below (with the name of the export file create_mp3_lists.bat (note: .bat is a batch file that can be run by windows!).
  • After you export it, mp3tag asks you if you want to view the file. Click "yes". A command window opens and you need to press a button to run that batch file. Only the batch file creates the playlists
  • you can double check the export file - the first line should look like this:
    $filename(.\playlists\create_mp3_lists.bat,ansi)@ECHO OFF

Thank you. I was able to make it work in part because there's now a playlist folder and batch file, but no playlists. There's some sort of error concerning the time. For now, I hope this process is correct:

Copy and paste the code to a file called create_mp3_lists.mte, and then copy it to the export folder of Mp3tag in Program Files.

Go to File - Options - Export, and create a new export configuration called create_mp3_lists. In Export File Name, enter

.\playlists\create_mp3_lists.bat

So, did you run the create_mp3_lists.bat file? A command window should open with the instructions, press any key to continue ...
What do you mean by "there is some error concerning the time"? You need to be more specific, best with screenshots etc.

Sorry, I was waiting for confirmation if the process I mentioned is right. I did the ff.

I copied and pasted the code to a file called create_mp3_lists.mte.

I copied the mte file to

C:\Program Files\Mp3tag\export

Then I went to MP3Tag, File - Options - Export, and created a new export configuration called create_mp3_lists. After doing so, MP3Tag closes the export dialog window.

I re-open the export dialog window, and in the export file name box, enter

.\playlists\create_mp3_lists.bat

and press OK.

Then using MP3Tag, I change directory to that containing the MP3s, press Ctrl-A to highlight all files, go to FIle - Export, choose create_mp3_lists, and press OK.

This time, it worked. It created a subdirectory called playlists, and it contains create_mp3_lists.bat, but the batch file contains the ff.

(Use the $filename command if you want to set the exported file default name and/or its encoding)

This is the header line of the export file

Use the loop(...) command do loop over specific fields of your files e.g.

This part is shown for all different artists: 10,000 Maniacs
You can even nest loops:

This will show the artists albums: [standalone recordings]
With its tracks:
What's the Matter Here?

This is followed by the same lines "This part" followed by names of other artists and songs.

And the end of the batch file is

Be sure to close the loops

This is the footer line - Have fun :slight_smile:

Sorry Danzig, I cannot debug what you are doing - it just seems to me you are not doing the very first step correctly.

  1. Create an Export configuration in MP3Tag with the tool commands
  • Menu File --> Export --> New
  • Enter "Create mp3 lists" or whatever you like
  • An Editor should open
  • Copy paste the code given (did you omit this step?)
  • Save (did you omit this step?)
  • The name of the Export file should then look like this: ".\playlists\create_mp3_lists.bat" (this will be automatically generated if you did everything correctly.

After running this export configuration (selecting files, etc.) you will be asked if you want to open the batch file, which you should confirm and it should run in a command window.

For reference: The batch file "create_mp3_lists.bat" should look something like this:

@ECHO OFF

REM ***************** This marks a batch file remark

REM **************************************************************************
REM ***************** Generated by Mp3tag v3.28 on 04.01.2025 12:49:50
ECHO ****************************************************************************************************************
ECHO MP3Tag: Automatically create playlists based on folders and tags - Written by Jozo Acksteiner
ECHO         Based on ideas of Moonbase
ECHO. 
ECHO DESCRIPTION:
ECHO    This tool creates playlists 
ECHO       a) for all blank separated words in the %%comment%% tag (multiple words = multiple playlists)
ECHO       b) for all subfolders in your Music Folder (one playlist for each subdirectory)
ECHO    The created playlists are named "-{Playlistname}-.m3u" (for blank separated words in the %%comment%% tag)
ECHO    The created playlists are named "-ZZZ_DIR-{foldername}-.m3u" (for all subfolders).
ECHO    They are stored in the folder \playlists (in the main music folder). The playlists reference relative to \playlist.
ECHO.
ECHO NOTES: 
ECHO    - The %%comment%% tag will be used to create playlists for *each* blank separated word in each %%comment%% tag 
ECHO         - make sure that the %%comment%% tag contains only words for which you want to create playlists!
ECHO.
ECHO INSTRUCTIONS
ECHO    1) Create an Exportconfiguration in MP3Tag with the tool commands
ECHO    2) Delete all content in the %%comment%% tags; create words in the %%comment%% tags for which you want to have playlists 
ECHO          (e.g. by genre: %%comment%%="rock pop" will create one playlist for "rock" and one for "pop")
ECHO    3) Highlight the files for which you want to create the playlists
ECHO    4) Use the export function in MP3Tag to run. This will create the file create_mp3_lists.bat in the \playlists folder
ECHO    5) MP3Tag will ask you to view the exported file. Confirm. The create_mp3_lists.bat will open in a new window. 
ECHO    6) Confirm again. The file create_mp3_lists.bat will create all playlists.
ECHO.
ECHO ****************************************************************************************************************
ECHO Start to create playlists for all folders and for all blank-separated words in the %%comment%% tag
ECHO IF YOU CONTINUE, ALL OLD PLAYLISTS WITH THE NAME "-*-.m3u" IN THE FOLDER \playlists WILL BE DELETED!
Pause 
ECHO.
ECHO.
SETLOCAL
SET PlaylistPath=..\playlists\
SET PrefixForDirectiory=^-ZZZ_DIR
ECHO Removing old ..\playlists\-*-.m3u files / playlists ...
DEL /Q "-*-.m3u"
ECHO complete.
ECHO.







ECHO Creating playlistentries for ..\1900^-1980\ABBA ^- Chiquitita.mp3 ...

...............................

Sorry, I just found out what happened: the editor never pops up because the MTE type was not associated with Notepad. I just found out after uninstalling and reinstalling MP3Tag.

It's working fine now. Thanks!

This is anyway probably not your configuration folder where your export-files have to be.
You can look for your Mp3tag-configuration folder which you can reach with
File->Open configuration folder
and in a standard installation should be:
%AppData%\Mp3Tag\export

Ah, that explains :slight_smile:

Glad you can confirm it works now!!!

It would be great for the community if you could share about your experience - do you use & like the script? etc ...

@Ohrenkino @LyicsLover - be aware: This process creates automatically multiple playlists based on all key-words that are blank separated in the %comment% tag, so it is not the same as file export to playlist (which only creates one playlist)

I had several playlists in separate folders and discovered that they had overlapping content, so I decided to do the following to save space (and put them in devices that had limited storage):

I used MusicBrainz on each folder to automatically tag but not rename the MP3s correctly. Then I MP3Tag on each folder to manually tag those that were not found by MusicBrainz using Discogs.

I then chose all files and used Tag - Filename to rename all files into Artist - Title.

I used MP3Tag to load each folder, and then mass-tagged the comment field using something resembling the folder name and anything generic to be able to put them together automatically. For example,

1980s newwave newwavediaries
1980s newwave newwavesynth
1970s 1980s softrock softrockhits

and so on, with one of the keywords (in this case, the last keyword) being close to the playlist and folder name (e.g., New Wave Diaries, New Wave and Synth Music, 100 Soft Rock Hits).

Next, after having copies of the playlists elsewhere, I moved all of the folders to one folder, and then used Suction (for Windows) to move all contents to the main folder, with any duplicates automatically renamed with (1) or (2) and so on.

The tedious part: I loaded the folder in MP3Tag and went over the duplicates. For each set, I chose one to keep, copied the keywords in each of the duplicates into that, and then deleted the dupes.

The result is that the number of files was reduced by at least 30 percent.

After cleaning up around 5 percent of the files, I then used the export script to make playlists.

From there, I just copy the whole folder to various devices. Those with Symfonium can be set to automatically load the playlists during the sync process or can use smart playlists (using the comment playfield containing a particular keyword), while that have older systems can just load the playlists.

Lastly, the arrangement doesn't work for old devices or systems that don't have smart playlists or can't load the playlists. In which case, I've to use the backed-up original folders that doubled as playlists.

I forgot to add that you can still make single playlists in this case: filter using comment HAS , select all files, and then generate a new playlist.