Get info from textfile as Action

I have a .txt-file with all titels from songs. They are listed simply under eachother in a list.

With Convert Textfile to Tag I can add those to the tag Title.

While that works perfect, I prefer to have it as a action. So I can do more actions at once, to save time eventually.

Can this be done?

Have you tried the Action from Type "Import Text File" yet?

Yes i have. But it ends up like this:

Not at the moment.
Currently the functions to import data from text files are split like that there is a converter to import from a single text file several fields to several tracks and an action that allows to import a single field from several text files to several tracks.

Thanks for clearing that. :+1:

It seems you have textfiles for many albums? If so you could setup an action group.

If the textfile has windows style line breaks, this action group should work:

1. Import the textfile to a temporary field, e.g. TEMPTITLE

2. Format value string for TEMPTITLE: $replace(%temptitle%,$char(13)$char(10),\\)

3. Several Format value strings for TITLE:

$if($eql(%track%,1),$meta(temptitle,0),%title%)

$if($eql(%track%,2),$meta(temptitle,1),%title%)

$if($eql(%track%,3),$meta(temptitle,2),%title%)

and so on. If your track numbers have leading zeros then adjust the strings accordingly.

4. Remove fields: TEMPTITLE

Hope this helps.

Excellent! This works! Thanks so much.

This is how it looks, made a few extra lines to cover recordings with lots of tracks:

You could reduce TRACK to its numerical value without fancy padding or added total number of tracks with:
$num(%track%,1)
The expression would then look like
$if($eql($num(%track%,1),1),$meta(temptitle,0),%title%)

Even though I admire the solution which shows once again tha MP3tag provides ways for almost any problem, I have my diffculties to see how this procedure should

I see quite an effort in the preparation of the files (have to have the correct track numbers) and adapting the action to the number of treated files.
IMHO the converter way which simply takes the text file and assigns the first record from the text file to the first selected file is much quicker.

Of course, I forgot about $num. Better this way.