# Advice with Actions to split title

**URL:** <https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049>\
**Category:** Support\
**Created:** [December 9, 2023, 12:35am UTC](https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049 "2023-12-09T00:35:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cldcp00](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/838e76/32.png) [@cldcp00](https://community.mp3tag.de/u/cldcp00)\
**Post date:** [December 9, 2023, 12:35am UTC](https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049/1 "2023-12-09T00:35:54Z")

</div>

I I have a situation with some of my tags where the file name is not suitable to be used and the user has put the title and artist in the title field example below

Title = `Desperate Time -- The Chantels`

How can I convert to

Artist = The Chantels  
Title = Desperate Time

Thanks in advance for you help  
Des

---

<div class="post-metadata">

**Author:** ![rboss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rboss](https://community.mp3tag.de/u/rboss)\
**Post date:** [December 9, 2023, 3:17am UTC](https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049/2 "2023-12-09T03:17:38Z")

</div>

For your given example:

Artist Tag:  
'Convert' \> 'Tag - Tag'  
Field: "ARTIST"  
Format string: `$trim($substr(%title%,$add($strstr(%title%,--),$len(--)),1000))`

Title Tag:  
'Convert' \> 'Tag - Tag'  
Field: "TITLE"  
Format string: `$trim($substr(%title%,1,$sub($strstr(%title%,--),$len(--))))`

Just be sure to write the 'Artist' tag first; the 'Title' tag overwrites itself, which will erase the artist's name from the current title.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)\
**Post date:** [December 9, 2023, 3:53am UTC](https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049/3 "2023-12-09T03:53:22Z")

</div>

You can also use an action **Guess values** with source format  
`%title%`

and guessing pattern  
`%artist% -- %title%`

> **[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:** ![cldcp00](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/838e76/32.png) [@cldcp00](https://community.mp3tag.de/u/cldcp00)\
**Post date:** [December 9, 2023, 11:37pm UTC](https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049/4 "2023-12-09T23:37:17Z")

</div>

thank guess for the solution much appreciated.  
Here's one how can you deal with the situation where the file name has no clear delimiter between the artists and the title what's the best approach for dealing with this example below  
Sammy Levi You Want To Love Me.mp3  
Required result  
Artist = Sammy Levi  
Title = You Want To Love Me

---

<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:** [December 10, 2023, 12:00am UTC](https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049/5 "2023-12-10T00:00:11Z")

</div>

You need a clear delimiter to divide the ARTIST from the TITLE.

If most of your filenames have a two word ARTIST followed by the TITLE you can get a result with the Convert Filename -\> Tag and the format string:  
`%ARTIST% %ARTIST% %TITLE%`

![image](https://community.mp3tag.de/uploads/default/original/2X/2/2c072a3d1547d2c6e157a632932a9096b6114b66.png)

But this does not work for  
`ABBA Waterloo`  
or  
`Emerson, Lake & Palmer Take a Pebble`  
or any other different combination.

---

<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:** [December 10, 2023, 8:23am UTC](https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049/6 "2023-12-10T08:23:38Z")

</div>

> [@cldcp00](#):
>
> Sammy Levi You Want To Love Me.mp3

You would have to filter for artists with 1, 2, 3 etc. name parts.  
Then you could use "Guess value" with a regular expression as source, e.g.  
`$regexp(%_filename%',(.*? .*?) (.*),$1==$2)`  
and target format string: `%artist%==%title%`

for the artists with an ampersand, the source would look like this:  
`$regexp(%_filename%',(.*? .*?& .*?) (.*),$1==$2)`

But you would have to spend the effort to find out how many name parts an artist has. MP3tag cannot read.

Alternative: if you have the artist name somewhere in the folder structure, you could fill the field ARTIST from there, import the filename as it is and then remove the artist name from the TITLE with an action of the type "Format value" and a $replace() statement.

The whole thing looks a lot like

> [@Help split Filename into fields and rename file](https://community.mp3tag.de/t/help-split-filename-into-fields-and-rename-file/59666):
>
> Hi there I have a filename Jimmy Cliff Hard Road To Travel Federal Records RARE Soul version.mp3 that has no tags. what is the best way to get the following Artist = Jimmy Cliff Title = Hard Road to Travel Filename = Jimmy Cliff - Hard Road To travel Comments = Federal Records RARE Soul version Thanks you in advance for any help

---

<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:** [January 9, 2024, 8:23am UTC](https://community.mp3tag.de/t/advice-with-actions-to-split-title/63049/7 "2024-01-09T08:23:56Z")

</div>

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