# How to convert Filename's last word to Album name ?

**URL:** https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633
**Category:** General Discussion
**Created:** [February 12, 2016, 3:54am UTC](https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633 "2016-02-12T03:54:22Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Ishan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/3da27b/32.png) [@Ishan](https://community.mp3tag.de/u/Ishan)
#### Post date: [February 12, 2016, 3:54am UTC](https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633/1 "2016-02-12T03:54:22Z")

</div>

I want to convert Filename to Album name but only the last word.

Example:  
FILENAME or TITLE: Someone Like You - Adele

I want only the last word 'Adele' to my ALBUM name.

SOLVED  
Convert -\> Tag - Tag  
Field: Album

Format String (for last 2 words):  
$regexp(%TITLE%,'^(.+)\s(.+)\s(.+)$','$2 $3')

Format String (for last word):  
$regexp(%TITLE%,'^(.+)\s(.+)\s(.+)$','$3')

---

<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: [February 12, 2016, 5:16am UTC](https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633/2 "2016-02-12T05:16:01Z")

</div>

Why don't you take an action of the type "Guess Values"?

Why do you want to fill the album Tag (which should be "21" in your example) with the name of the artist or albumartist?

---

<div class="post-metadata">

### Author: ![Ishan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/3da27b/32.png) [@Ishan](https://community.mp3tag.de/u/Ishan)
#### Post date: [February 12, 2016, 6:46am UTC](https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633/3 "2016-02-12T06:46:48Z")

</div>

Sorry That was an example.  
I'm collecting some old Bollywood movie's songs. So I want the movie name in the "ALBUM" section.  
TITLE contains movie name but there is a " - " before it.  
So how can I convert everything after " - " to "ALBUM" ?

Example:  
TITLE: Meri Hasraton Ka - Mehndi Ban Gayi Khoon  
(everything after " - " is the movie's name)  
I want that name in "ALBUM"

Please see this screen snap:  
 ![](http://i68.tinypic.com/5ff09f.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: [February 12, 2016, 7:05am UTC](https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633/4 "2016-02-12T07:05:41Z")

</div>

Create an action of the type "Guess value" (import tag field) for TITLE  
Format string: %title% - %album%

---

<div class="post-metadata">

### Author: ![Ishan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/3da27b/32.png) [@Ishan](https://community.mp3tag.de/u/Ishan)
#### Post date: [February 12, 2016, 7:32am UTC](https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633/5 "2016-02-12T07:32:47Z")

</div>

I've tried "Guess Value" but that makes the whole TITLE to ALBUM.  
But I just want the last part.

Example:  
TITLE: Halat Na Poochho - Yeh Zindagi Ka Safar

Here movie name is: Yeh Zindagi Ka Safar  
I want that part to ALBUM section.

---

<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: [February 12, 2016, 7:39am UTC](https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633/6 "2016-02-12T07:39:40Z")

</div>

> [@Ishan](#):
>
> I've tried "Guess Value" but that makes the whole TITLE to ALBUM.  
> But I just want the last part.
> 
> Example:  
> TITLE: Halat Na Poochho - Yeh Zindagi Ka Safar
> 
> Here movie name is: Yeh Zindagi Ka Safar  
> I want that part to ALBUM section.

E.g.  
TITLE = Lost Boys - Sweet Nothing Play Hard  
ALBUM = (empty)  
Source: %title%  
Format String: %title% - %album%  
Result:  
TITLE = Lost Boys  
ALBUM = Sweet Nothing Play Hard

If you mixed up the source (the source is where all of the data is stored) or the separator is not right (e.g. instead of blank-hyphen-blank it is just hyphen) then the action will fail.

---

<div class="post-metadata">

### Author: ![Ishan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/3da27b/32.png) [@Ishan](https://community.mp3tag.de/u/Ishan)
#### Post date: [February 13, 2016, 4:40am UTC](https://community.mp3tag.de/t/how-to-convert-filenames-last-word-to-album-name/17633/7 "2016-02-13T04:40:15Z")

</div>

> [@ohrenkino](#):
>
> E.g.  
> TITLE = Lost Boys - Sweet Nothing Play Hard  
> ALBUM = (empty)  
> Source: %title%  
> Format String: %title% - %album%  
> Result:  
> TITLE = Lost Boys  
> ALBUM = Sweet Nothing Play Hard
> 
> If you mixed up the source (the source is where all of the data is stored) or the separator is not right (e.g. instead of blank-hyphen-blank it is just hyphen) then the action will fail.

Thank You So Much.  
That works.  
Many Many Thanks. 😃
