# How to populate different fields from string elements in the Title tag or file name

**URL:** https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644
**Category:** Support
**Created:** [May 28, 2025, 7:49pm UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644 "2025-05-28T19:49:24Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![MP3TaggingJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e19b73/32.png) [@MP3TaggingJ](https://community.mp3tag.de/u/MP3TaggingJ)
#### Post date: [May 28, 2025, 7:49pm UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/1 "2025-05-28T19:49:24Z")

</div>

I created a title field tag for about 450 files by importing the complete file name, except for the extension. The result is a set of Title tags with a consistent structure in terms of the sequence of metadata elements. As an example, this is one such title: "Felix Mendelssohn - Neville Marriner, Academy of St. Martin in the Fields, Viktoria Mullova - Violin Concerto In E Minor, Op. 64 - 1. Allegro molto appassionato"

That move may have been a mistake, because I actually want the Title tag to only include the name of the work and the movement: "Violin Concerto In E Minor, Op. 64 - 1. Allegro molto appassionato."

I also want the Artist and Composer tags to reflect the same info: Felix Mendelssohn.

Finally, I want the Album Artist field to show all the performers: Neville Marriner, Academy of St. Martin in the Fields, Viktoria Mullova.

Given this situation, how can I use the existing data in the Title tag, or in the file name field, to populate these four fields described above: Composer, Artist, Album Artist, Title?

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [May 28, 2025, 7:54pm UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/2 "2025-05-28T19:54:06Z")

</div>

> [@MP3TaggingJ](#):
>
> Given this situation, how can I use the existing data in the Title tag, or in the file name field, to populate these four fields described above: Composer, Artist, Album Artist, Title?

Are you sure that you always have the following parts:  
ARTIST and COMPOSER  
space hyphen space  
ALBUMARTIST  
space hyphen space  
TITLE  
in all your 450 files?

If yes, you could try Convert Filename -\> Tag as first step with this Format string:  
`%ARTIST% - %ALBUMARTIST% - %TITLE%`

In a second step you could use Convert Tag -\> Tag  
Field:  
`COMPOSER`  
Format string:  
`%ARTIST%`  
to duplicate the content of ARTIST into COMPOSER

---

<div class="post-metadata">

### Author: ![MP3TaggingJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e19b73/32.png) [@MP3TaggingJ](https://community.mp3tag.de/u/MP3TaggingJ)
#### Post date: [May 29, 2025, 8:02pm UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/3 "2025-05-29T20:02:11Z")

</div>

Except for file names where I've made mistakes, all are supposed to have the structure and sequence you described. If I select a single file, I can successfully "Convert Filename -\> Tag" using the variables you supplied. However, I don't want to do that 450 times. When I select all, or even more than one file, the "OK" button is grayed out in the dialog, so I can't process the requested conversion. Any ideas about that?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 29, 2025, 8:13pm UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/4 "2025-05-29T20:13:29Z")

</div>

> [@MP3TaggingJ](#):
>
> Felix Mendelssohn - Neville Marriner, Academy of St. Martin in the Fields, Viktoria Mullova - Violin Concerto In E Minor, Op. 64 - 1. Allegro molto appassionato

Try an action of the type "Guess value"  
Source: `$regexp(%title%,(.*?) - (.*?) - (.*),$1==$2==$3)`  
Target format string: `%composer%==%artist%==%title%`

---

<div class="post-metadata">

### Author: ![Doug\_Mackie](https://community.mp3tag.de/user_avatar/community.mp3tag.de/doug_mackie/32/279_2.png) [@Doug\_Mackie](https://community.mp3tag.de/u/Doug_Mackie)
#### Post date: [May 29, 2025, 10:43pm UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/5 "2025-05-29T22:43:22Z")

</div>

> [@MP3TaggingJ](#):
>
> When I select all, or even more than one file, the "OK" button is grayed out in the dialog, so I can't process the requested conversion. Any ideas about that?

Every file in the selection must have exactly the same number of file name elements and the same delimiters as in the Filename to Tag format string shown in the Conversion dialog. Any deviation will keep the OK and Preview buttons grayed out.

---

<div class="post-metadata">

### Author: ![MP3TaggingJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e19b73/32.png) [@MP3TaggingJ](https://community.mp3tag.de/u/MP3TaggingJ)
#### Post date: [May 30, 2025, 5:11am UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/6 "2025-05-30T05:11:03Z")

</div>

This certainly sounds like it would cause the problematic behavior, but I can't confirm that.

For instance, here are two file names that appear to me to be structured identically:

Charles Ives\_Morton Gould, Chicago Symphony\_Symphony No. 1 in D Minor - I. Allegro (1993 Remastered).mp3

Charles Ives\_Morton Gould, Chicago Symphony\_Symphony No. 1 in D Minor - II. Adagio molto (sostenuto) (1993 Remastered).mp3

However, if I select both of them, open the CONVERT \> Filename - Tag dialog, and set the variables like this (%ARTIST% - %ALBUMARTIST% - %TITLE%), the OK button is still grayed out.

Although I don't understand the exact vocabulary of the rule you stated ("Every file in the selection must have exactly the same number of file name elements and the same delimiters as in the Filename to Tag format string shown in the Conversion dialog"), it seems like they are so nearly identical that they should convert. What am I missing?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 30, 2025, 5:41am UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/7 "2025-05-30T05:41:49Z")

</div>

> [@MP3TaggingJ](#):
>
> Charles Ives\_Morton Gould, Chicago Symphony\_Symphony No. 1 in D Minor - II. Adagio molto (sostenuto) (1993 Remastered).mp3 ...  
> %ARTIST% - %ALBUMARTIST% - %TITLE%

While you use the hyphen as separator / delimiter in the format string (and there 2 of them), the original data in the filename has the underscore as separator and only 1 hyphen.  
So the pattern does not match the data.  
The OK button is not enabled, if (already) the first filename in the selection does not match the pattern. Any file further on that does not match is simply not treated.

See also the documentation:

> **[Import Tags from File and Folder Names – Mp3tag Documentation](https://docs.mp3tag.de/converters/import-tags-from-filenames/)**
>
> Documentation on Filename to Tag, a converter to import tags from file and folder names. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![MP3TaggingJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e19b73/32.png) [@MP3TaggingJ](https://community.mp3tag.de/u/MP3TaggingJ)
#### Post date: [May 30, 2025, 6:47am UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/8 "2025-05-30T06:47:51Z")

</div>

A good proofreader is hard to find. Hyphens and underscores indeed are not the same!

I think I've got it now. Reviewing all my file names in a list, I can see that I used underscores about 20% of the time instead of the hyphens. There's nothing like operator error to foul up a good plan!

Thanks very much for your help.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 30, 2025, 8:39am UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/9 "2025-05-30T08:39:59Z")

</div>

I would also be interested in the effect of my suggestion

> [@ohrenkino](#):
>
> Try an action of the type "Guess value"  
> Source: `$regexp(%title%,(.*?) - (.*?) - (.*),$1==$2==$3)`  
> Target format string: `%composer%==%artist%==%title%`

as that would deal with the non-unique separator in  
`Felix Mendelssohn - Neville Marriner, Academy of St. Martin in the Fields, Viktoria Mullova - Violin Concerto In E Minor, Op. 64 - 1. Allegro molto appassionato`  
which has a 3rd hypen in the title.

---

<div class="post-metadata">

### Author: ![MP3TaggingJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e19b73/32.png) [@MP3TaggingJ](https://community.mp3tag.de/u/MP3TaggingJ)
#### Post date: [May 31, 2025, 3:28pm UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/10 "2025-05-31T15:28:33Z")

</div>

I wasn't ignoring this reply. I saw it at the same time I saw the one which let me realize that my problem was caused by the variations in my file names caused by their use of a mixture of underscores and hyphens. I then ran with that, changed my file names as necessary, and proceeded to complete the job.

I chose that path instead of experimenting with your suggestion because I could see that it involved working with regular expressions, and I have no experience with doing that.

I intended to come back to thank you for your input, and here I am. I just marked your explanation about the hyphens and underscores as a "solution."

Thanks again.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [June 30, 2025, 3:28pm UTC](https://community.mp3tag.de/t/how-to-populate-different-fields-from-string-elements-in-the-title-tag-or-file-name/68644/11 "2025-06-30T15:28:53Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
