# Extract text from title or filename

**URL:** https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339
**Category:** General Discussion
**Created:** [October 16, 2016, 6:22pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339 "2016-10-16T18:22:52Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![billtkd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/74df32/32.png) [@billtkd](https://community.mp3tag.de/u/billtkd)
#### Post date: [October 16, 2016, 6:22pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/1 "2016-10-16T18:22:52Z")

</div>

I have ripped several CDs with incorrectly formatted freedb entries. The artists' names and track titles are combined in the Title tag, usually separated by a dash or a solidus (/), and the Title tags just say 'Various Artists'.  
Is there a way to extract the component text automatically?  
(Apologies if this has been covered 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: [October 17, 2016, 3:11am UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/2 "2016-10-17T03:11:47Z")

</div>

> [@Bill TKD](#):
>
> I have ripped several CDs with incorrectly formatted freedb entries. The artists' names and track titles are combined in the Title tag, ...and the Title tags just say 'Various Artists'....

Not quite clear what can be found in the title field as you mention it twice.

I assume you have a TITLE field like Deep Purple / Smoke on the Water

Create an action of the type "Guess value" for %title%  
Guessing pattern: %artist% / %title%

Please note that the separator has to be entered exactly as it is in the field. It is a difference whether you find  
%artist% / %title%  
or  
%artist%/%title%

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [October 17, 2016, 3:19am UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/3 "2016-10-17T03:19:32Z")

</div>

> [@Bill TKD](#):
>
> I have ripped several CDs with incorrectly formatted freedb entries. The artists' names and track titles are combined in the Title tag, usually separated by a dash or a solidus (/), and the Title tags just say 'Various Artists'.  
> Is there a way to extract the component text automatically?  
> (Apologies if this has been covered before.)

This is very common in freedb with samplers because no albumartist is used. As you don't tell us what's in the filename I cannot tell you how to resolve the problem with the filename.  
Have a look at the FAQ  
[/t/8016/1](https://community.mp3tag.de/t/8016/1)

Without using the filename you can use two actions or combine them as an action group:  
First you have to get the files with the same separator in a row. Then mark all of them.

1. Save the calue of the artist-tag to the albumartist-tag  
Action Type: Format Values  
Field: ALBUMARTIST  
Format String: %artist%

2. Get artist and title from the title-tag  
Action Type: Gues Values  
Source Format: %title%  
Guessing pattern: %artist%/%title%  
or %artist% / %title% or %artist% - %title%

The guessing pattern of the second action depends of the kind of separator in the tags and if there is a white space or not. The separator is always the complete string of characters between artist and title.

Test this with a copy of your files. It does not work properly if the chosen separator character is present in the artist-name too.

---

<div class="post-metadata">

### Author: ![billtkd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/74df32/32.png) [@billtkd](https://community.mp3tag.de/u/billtkd)
#### Post date: [October 17, 2016, 3:51pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/4 "2016-10-17T15:51:48Z")

</div>

Sorry, I mistyped. I meant that the Artist tags all say 'Various Artists'.

I'll try out your suggestions.

---

<div class="post-metadata">

### Author: ![billtkd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/74df32/32.png) [@billtkd](https://community.mp3tag.de/u/billtkd)
#### Post date: [October 17, 2016, 3:58pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/5 "2016-10-17T15:58:20Z")

</div>

Brilliant. It worked a treat. Thank you.

---

<div class="post-metadata">

### Author: ![Silver\_Surfer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@Silver\_Surfer](https://community.mp3tag.de/u/Silver_Surfer)
#### Post date: [November 22, 2016, 12:48pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/6 "2016-11-22T12:48:10Z")

</div>

Not for me it didn't as i don't have a clue

Heres where i tried and failed

Can someone do an idiots guide

![](https://community.mp3tag.de/uploads/default/original/2X/5/566978441ed3573917f3531c26b7897ecd013573.jpg)

![](https://community.mp3tag.de/uploads/default/original/2X/5/566978441ed3573917f3531c26b7897ecd013573.jpg)

---

<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: [November 22, 2016, 1:38pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/7 "2016-11-22T13:38:11Z")

</div>

> [@Silver Surfer](#):
>
> Not for me it didn't as i don't have a clue
> 
> Heres where i tried and failed
> 
> Can someone do an idiots guide
> 
> ![](https://community.mp3tag.de/uploads/default/original/2X/5/566978441ed3573917f3531c26b7897ecd013573.jpg)

Is this a completely different problem? The action for case conversion has nothing to do with import das from a text file?  
If this is a different problem, could you open a new thread?

---

<div class="post-metadata">

### Author: ![Silver\_Surfer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@Silver\_Surfer](https://community.mp3tag.de/u/Silver_Surfer)
#### Post date: [November 22, 2016, 3:37pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/8 "2016-11-22T15:37:36Z")

</div>

> [@ohrenkino](#):
>
> Is this a completely different problem? The action for case conversion has nothing to do with import das from a text file?  
> If this is a different problem, could you open a new thread?

No exactly the same problem as Bill TKD

A left the picture so you could see i was trying to work it out for myself, but failing badly

---

<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: [November 22, 2016, 4:34pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/9 "2016-11-22T16:34:20Z")

</div>

> [@Silver Surfer](#):
>
> No exactly the same problem as Bill TKD
> 
> A left the picture so you could see i was trying to work it out for myself, but failing badly

For me it is absolutely not clear what you want to do: you use an action of the type "Case conversion" that either applies a capital letter to the first word, every word or all in capitals.  
What does that have to do with the extraction of text from title or filename?

Or could this be the case: "case" and "Guess" sound so similar and you do not use the English version?!  
The "Guess value" action could be named something like "import data from tag-field" - see if you find an action that looks like it can get data from a tag-field and then see if that works better.

---

<div class="post-metadata">

### Author: ![Silver\_Surfer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@Silver\_Surfer](https://community.mp3tag.de/u/Silver_Surfer)
#### Post date: [November 22, 2016, 5:13pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/10 "2016-11-22T17:13:38Z")

</div>

> [@poster](#):
>
> This is very common in freedb with samplers because no albumartist is used. As you don't tell us what's in the filename I cannot tell you how to resolve the problem with the filename.  
> Have a look at the FAQ  
> [/t/8016/1](https://community.mp3tag.de/t/8016/1)
> 
> Without using the filename you can use two actions or combine them as an action group:  
> First you have to get the files with the same separator in a row. Then mark all of them.
> 
> 1. Save the calue of the artist-tag to the albumartist-tag  
> Action Type: Format Values  
> Field: ALBUMARTIST  
> Format String: %artist%
> 
> 2. Get artist and title from the title-tag  
> Action Type: Gues Values  
> Source Format: %title%  
> Guessing pattern: %artist%/%title%  
> or %artist% / %title% or %artist% - %title%
> 
> The guessing pattern of the second action depends of the kind of separator in the tags and if there is a white space or not. The separator is always the complete string of characters between artist and title.
> 
> Test this with a copy of your files. It does not work properly if the chosen separator character is present in the artist-name too.

This is exactly what i am trying to correct

 ![](https://community.mp3tag.de/uploads/default/original/2X/2/2f3aa313058ede11f1a68ef135554dc7e6950736.jpg)  

Get the artist correct

And then rename the filename from the tags ARTIST and TITLE

Thanks

 ![](https://community.mp3tag.de/uploads/default/original/2X/2/2f3aa313058ede11f1a68ef135554dc7e6950736.jpg)

---

<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: [November 22, 2016, 5:51pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/11 "2016-11-22T17:51:59Z")

</div>

> [@Silver Surfer](#):
>
> This is exactly what i am trying to correct
> 
> ![](https://community.mp3tag.de/uploads/default/original/2X/2/2f3aa313058ede11f1a68ef135554dc7e6950736.jpg)  
> 
> Get the artist correct
> 
> And then rename the filename from the tags ARTIST and TITLE
> 
> Thanks

In your case, I think, the separator in %title% is the " - ".  
Action of the type "Guess value" for  
Source: %title%  
Guessing Pattern: %artist% - %title%

---

<div class="post-metadata">

### Author: ![Silver\_Surfer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@Silver\_Surfer](https://community.mp3tag.de/u/Silver_Surfer)
#### Post date: [November 22, 2016, 6:42pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/12 "2016-11-22T18:42:03Z")

</div>

> [@ohrenkino](#):
>
> In your case, I think, the separator in %title% is the " - ".  
> Action of the type "Guess value" for  
> Source: %title%  
> Guessing Pattern: %artist% - %title%

Yes that's it, i just don't know how to implement it ☹ ☹ ☹

---

<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: [November 22, 2016, 6:45pm UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/13 "2016-11-22T18:45:10Z")

</div>

> [@Silver Surfer](#):
>
> Yes that's it, i just don't know how to implement it ☹ ☹ ☹

There are some threads about actions in the FAqs: [/t/967/1](https://community.mp3tag.de/t/967/1)

Perhaps that helps.

---

<div class="post-metadata">

### Author: ![Silver\_Surfer](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@Silver\_Surfer](https://community.mp3tag.de/u/Silver_Surfer)
#### Post date: [November 30, 2016, 10:37am UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/14 "2016-11-30T10:37:33Z")

</div>

> [@ohrenkino](#):
>
> There are some threads about actions in the FAqs: [/t/967/1](https://community.mp3tag.de/t/967/1)
> 
> Perhaps that helps.

Thanks for trying but that didn't help ![:angry:](https://community.mp3tag.de/uploads/default/original/1X/ebadaff04ae073d3d1cb3e2f4c6acf132380e5a5.gif ":angry:")

But i did finally work out how 😃 😃

---

<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: [November 30, 2016, 10:44am UTC](https://community.mp3tag.de/t/extract-text-from-title-or-filename/18339/15 "2016-11-30T10:44:26Z")

</div>

> [@Silver Surfer](#):
>
> Thanks for trying but that didn't help ![:angry:](https://community.mp3tag.de/uploads/default/original/1X/ebadaff04ae073d3d1cb3e2f4c6acf132380e5a5.gif ":angry:")
> 
> But i did finally work out how 😃 😃

As the link lead to a fairly comprehensive part of the FAQs, it would be nice to hear why those passages did not help. Only with feedback it is possible to improve them.
