# Extract part of a file name into artists column

**URL:** <https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768>\
**Category:** Support\
**Created:** [April 22, 2023, 4:44am UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768 "2023-04-22T04:44:32Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbpt1984](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mbpt1984](https://community.mp3tag.de/u/mbpt1984)\
**Post date:** [April 22, 2023, 4:44am UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/1 "2023-04-22T04:44:32Z")

</div>

Hi all,

i was hoping you would be able to help. i have approx 4k files that i need to change the artists column, however rather than typing it out is there a way i can extract part of the information from the filename?

for example

1. Rihanna - Don't Stop The Music ( this is the file name)

also how does it work with secondary names like - 01.The Fray - how to save a life

but all i want to have is the artist part not the 01 or the last bit, is this possible if so please could someone assist in a simply way for me please

---

<div class="post-metadata">

**Author:** ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)\
**Post date:** [April 22, 2023, 4:55am UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/2 "2023-04-22T04:55:31Z")

</div>

Try the Action (Quick) type Guess Values.  
Source: `%_filename%`  
Pattern: `%dummy%. %artist% - %dummy%`

> **[Guess Values – Mp3tag Documentation](https://docs.mp3tag.de/actions/guess/)**
>
> Documentation on the Guess Value action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

**Author:** ![mbpt1984](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mbpt1984](https://community.mp3tag.de/u/mbpt1984)\
**Post date:** [April 22, 2023, 5:04am UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/3 "2023-04-22T05:04:01Z")

</div>

> [@MotleyG](#):
>
> %dummy%. %artist% - %dummy%

hi,

thank you, it gave me the second part however at the beginning it gives me this ?

- Whitney Houston (Its got the line at the front?)

---

<div class="post-metadata">

**Author:** ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)\
**Post date:** [April 22, 2023, 5:06am UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/4 "2023-04-22T05:06:44Z")

</div>

This is a different example. What does that filename look like? The “Pattern” needs to match exactly what the source has. Modify this as required to get the results you need.

---

<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:** [April 22, 2023, 7:10am UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/5 "2023-04-22T07:10:06Z")

</div>

I would like to add that a similar function is available with Covert\>Filename-Tag.  
The syntax for the pattern that @MotleyG proposed stays the same.  
The benefit of that function is that it has a preview which may ease the application of the corresponding pattern.

---

<div class="post-metadata">

**Author:** ![mbpt1984](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mbpt1984](https://community.mp3tag.de/u/mbpt1984)\
**Post date:** [April 22, 2023, 5:45pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/6 "2023-04-22T17:45:04Z")

</div>

hi,

it gives me this - whitney houston

how do i get rid of the line before?

---

<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:** [April 22, 2023, 6:56pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/7 "2023-04-22T18:56:31Z")

</div>

Please show us a real filename.  
If you get more data than you want, then you have not defined the pattern according to the source data.

---

<div class="post-metadata">

**Author:** ![mbpt1984](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mbpt1984](https://community.mp3tag.de/u/mbpt1984)\
**Post date:** [April 22, 2023, 7:33pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/8 "2023-04-22T19:33:31Z")

</div>

not sure what data you want ?

`1. Rihanna - Don't Stop The Music` That is the file name to start  
I put in %dummy% %artist% - %dummy% under the alt-2 and i end of up

`- Rihanna` in the artists field, however i dont want the Line in front of the artist name?

---

<div class="post-metadata">

**Author:** ![mbpt1984](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mbpt1984](https://community.mp3tag.de/u/mbpt1984)\
**Post date:** [April 22, 2023, 7:34pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/9 "2023-04-22T19:34:04Z")

</div>

not a dot its a - Rihanna

---

<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:** [April 22, 2023, 7:41pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/10 "2023-04-22T19:41:20Z")

</div>

> [@mbpt1984](#):
>
> `1. Rihanna - Don't Stop The Music`

plus

> [@mbpt1984](#):
>
> %dummy% %artist% - %dummy%

will never lead to `- Rihanna`  
 ![grafik](https://community.mp3tag.de/uploads/default/original/2X/e/ec57359785d8ff71a47678d5366910544a7ffb2d.png)

This is, what I get - please note the filename as "Format string" at the top of the dialogue which is an exact copy of the filename that you showed here.  
So, please show us the real filename. As for the purpose to get simply the artist name the pattern that @MotleyG suggested will lead to the exact result..

---

<div class="post-metadata">

**Author:** ![mbpt1984](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mbpt1984](https://community.mp3tag.de/u/mbpt1984)\
**Post date:** [April 22, 2023, 8:43pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/11 "2023-04-22T20:43:57Z")

</div>

![image](https://community.mp3tag.de/uploads/default/original/2X/f/f1ac6e2c80dab4b95b69566f86d1a3819f7c51e1.jpeg)

this is what it gives me?

---

<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:** [April 22, 2023, 8:49pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/12 "2023-04-22T20:49:34Z")

</div>

Of course it does - as this filename is  
01 - Duran Duran - The Reflex (Dance Mix)  
The example that you gave before had a dot instead of the hyphen as separator.

For those you need  
%dummy% - %artist% - %dummy%

---

<div class="post-metadata">

**Author:** ![mbpt1984](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mbpt1984](https://community.mp3tag.de/u/mbpt1984)\
**Post date:** [April 22, 2023, 8:50pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/13 "2023-04-22T20:50:04Z")

</div>

also how would i extract the song name to the title part ?

again the file name has all the info so how do you extract the song , same as the artists in title but getting the next portion of the filename to be added into the title

---

<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:** [April 22, 2023, 8:52pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/14 "2023-04-22T20:52:29Z")

</div>

Which filename do you want to treat?

I would suggest that you try:  
`%track%. %artist% - %title%`  
and the other pattern:  
`%track% - %artist% - %title%`  
You get a feedback with the preview.

---

<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:** [April 22, 2023, 9:09pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/15 "2023-04-22T21:09:55Z")

</div>

> [@mbpt1984](#):
>
> `1. Rihanna - Don't Stop The Music` That is the file name to start  
> I put in %dummy% %artist% - %dummy% under the alt-2 and i end of up

You have to use the EXACT matching parts/placeholders and characters to split your information from the filename into the tags.

If you don't want to save the number 1 before the dot into a tag like `%track%` then use `%dummy`% and a dot instead:  
`%dummy%.`  
then a space and then `%artist%` (if "Rihanna" should be saved in the ARTIST tag)  
then a space, a minus and a space  
then `%title%` (if "Don't Stop The Music" should be saved in the TITLE tag)

Combined it should look like  
`%dummy%. %artist% - %title%`

If you do that with Convert Filename -\> Tag you can immediately see if the format string matches your filename:  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/7/799fbe877085f711cae98351c2fe529405b3127d.png)

---

<div class="post-metadata">

**Author:** ![mbpt1984](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mbpt1984](https://community.mp3tag.de/u/mbpt1984)\
**Post date:** [April 22, 2023, 9:22pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/16 "2023-04-22T21:22:06Z")

</div>

Thank you very much everyone that has worked and i also gained knowledge from you, thank you once 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:** [May 22, 2023, 9:22pm UTC](https://community.mp3tag.de/t/extract-part-of-a-file-name-into-artists-column/60768/17 "2023-05-22T21:22:17Z")

</div>

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