# Action doing the same as "Filename - Tag" ?

**URL:** https://community.mp3tag.de/t/action-doing-the-same-as-filename-tag/8143
**Category:** General Discussion
**Created:** [March 24, 2009, 7:01am UTC](https://community.mp3tag.de/t/action-doing-the-same-as-filename-tag/8143 "2009-03-24T07:01:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Pol\_Davril](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/9fc29f/32.png) [@Pol\_Davril](https://community.mp3tag.de/u/Pol_Davril)
#### Post date: [March 24, 2009, 7:01am UTC](https://community.mp3tag.de/t/action-doing-the-same-as-filename-tag/8143/1 "2009-03-24T07:01:18Z")

</div>

Hi,

Is there a way to create an Action doing the same as "Filename - Tag" conversion ?  
The aim is to include that action in an action group to perform several processes in one click.

Other question : is it possible to create an action to initialize "Genre" to "Pop" for all selected mp3 files ?

Thanks.

_Edit_ : the "Filename - Tag" pattern is "%dummy%\%artist%\%album%\%track%\_%title%".

---

<div class="post-metadata">

### Author: ![Pol\_Davril](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/9fc29f/32.png) [@Pol\_Davril](https://community.mp3tag.de/u/Pol_Davril)
#### Post date: [March 25, 2009, 12:00pm UTC](https://community.mp3tag.de/t/action-doing-the-same-as-filename-tag/8143/2 "2009-03-25T12:00:13Z")

</div>

I've tried again without success.  
Here is more information about my request.

All my mp3 files are stored in folders, as following:  
C:[variable path structure][artist][album][track]\_[title].mp3

Thus, with "Convert" -\> "Filename - Tag" conversion, I'm using the format string "%dummy%\%artist%\%album%\%track%\_%title%", which runs fine.  
The %dummy% argument drops all leading and useless sub-folders, so only the two last folders of the path are used as artist and album.

I have tried an action script with "Guess values" to extract the artist and album.  
Source format: %\_folderpath%  
Guessing pattern: %dummy%\%artist%\%album%\

This action does not work the same way : the artist is set to the first sub-folder name, the album is set from the second sub-folder to the end of the path.

Is there a way to extract the two LAST sub-folders as artist and album with an action script, just like the "Filename - Tag" does ?

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [March 25, 2009, 12:08pm UTC](https://community.mp3tag.de/t/action-doing-the-same-as-filename-tag/8143/3 "2009-03-25T12:08:20Z")

</div>

Source format: %\_parent\_directory%\%\_directory%  
Guessing pattern: %artist%\%album%

or  
Source format: %\_parent\_directory%\%\_directory%\%_filename%  
Guessing pattern: %artist%\%album%\%track%_%title%

---

<div class="post-metadata">

### Author: ![Pol\_Davril](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/9fc29f/32.png) [@Pol\_Davril](https://community.mp3tag.de/u/Pol_Davril)
#### Post date: [March 26, 2009, 7:56am UTC](https://community.mp3tag.de/t/action-doing-the-same-as-filename-tag/8143/4 "2009-03-26T07:56:22Z")

</div>

Thanks dano.  
That's exactly what I need 😉
