# Tag to filename: copy right part of the title starting from the certain character

**URL:** <https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283>\
**Category:** Support\
**Created:** [June 17, 2023, 10:22pm UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283 "2023-06-17T22:22:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![macakcira](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@macakcira](https://community.mp3tag.de/u/macakcira)\
**Post date:** [June 17, 2023, 10:22pm UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/1 "2023-06-17T22:22:31Z")

</div>

Hi all, I need some help please.  
I want to make a filename out of the part of the TITLE tag.

Here is the title: Aphorisms: № 01. Recitative

What I would like is to make a filename named Recitative

I know how to do this work when I want to change part ot the same tag, eg. TITLE (replace with regular expressions -\> field: TITLE ; regular expression: .\* (with empty space after the asterisk because R from Recitative comes after empty space)) but I have no idea how to do it with tag to filename..

---

<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:** [June 17, 2023, 11:38pm UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/2 "2023-06-17T23:38:05Z")

</div>

Do ALL of the titles for the files you want to rename share a common separator, like “ № 01. ” in your example? Or even something as simple as just the “. “ part?

If you have a screenshot of the list that would help.

---

<div class="post-metadata">

**Author:** ![macakcira](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@macakcira](https://community.mp3tag.de/u/macakcira)\
**Post date:** [June 17, 2023, 11:48pm UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/4 "2023-06-17T23:48:11Z")

</div>

Yes. Here is a list of all the titles:  
Aphorisms: № 01. Recitative  
Aphorisms: № 02. Serenade  
Aphorisms: № 03. Nocturne  
Aphorisms: № 04. Elegy  
Aphorisms: № 05. Funeral March  
Aphorisms: № 06. Etude  
Aphorisms: № 07. Dance of Death  
Aphorisms: № 08. Canon  
Aphorisms: № 09. Legend  
Aphorisms: № 10. Lullaby

I always have № and its number, following a period and empty space

---

<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:** [June 18, 2023, 12:33am UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/5 "2023-06-18T00:33:40Z")

</div>

I’ll have to play around with this for a bit. Generally it is easier to separate the filename into separate tags using the Action for Guess Values. But I don’t believe this works the other way, to format the filename. It may need two steps, but I’ll experiment and get back to you shortly.

---

<div class="post-metadata">

**Author:** ![macakcira](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@macakcira](https://community.mp3tag.de/u/macakcira)\
**Post date:** [June 18, 2023, 12:52am UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/6 "2023-06-18T00:52:26Z")

</div>

Thank you so much, if you come up with something please tell me. Because I have many hundreds of files tagged like this and if I could automate the process it would save me lots of time.. 🙏

---

<div class="post-metadata">

**Author:** ![macakcira](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@macakcira](https://community.mp3tag.de/u/macakcira)\
**Post date:** [June 18, 2023, 2:46am UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/7 "2023-06-18T02:46:25Z")

</div>

OK I think I found something that's working.  
Actually the format of the file name should be "01 Recitative", "02 Serenade", etc. but since I can get those numbers at the front easily by typing %track% (those numbers are in 99% of cases same as the %track% numbers) I didn't bother mentioning. But now I found a function that I changed a bit and now its working almost perfectly without using %track%

`$regexp(%title%,(.*) № (.*),$2)`

The only problem is I get a dot after the number, so then I do a second step by goind to replace -\> 'Field:' \_FILENAME, 'Original:' . (dot) and 'Replace with' stays empty and now it shows good!

So sorry I didn't mention there should be numbers first. For me this is working, but if you or anyone else knows some other more elegant solution please post it, as I'd much rather use 1 step solution instead of 2 steps 😇

---

<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:** [June 18, 2023, 3:50am UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/8 "2023-06-18T03:50:21Z")

</div>

I was going to suggest the Action to “Guess Values.” But it seems this Action does not apply for the %\_filename% field. This information field is one of the few that mp3tag can usually edit, but seems not with this Action.

---

<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:** [June 18, 2023, 6:08am UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/9 "2023-06-18T06:08:41Z")

</div>

> [@macakcira](#):
>
> Aphorisms: № 01. Recitative

What about: Convert\>Filename-Tag  
String: `%dummy%. %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:** [June 18, 2023, 6:13am UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/10 "2023-06-18T06:13:22Z")

</div>

> [@macakcira](#):
>
> Actually the format of the file name should be "01 Recitative", "02 Serenade", etc

So it's a completey different pattern than in the original post?!  
To get just a number and the trailing text, try:  
`$regexp('Aphorisms: № 01. Recitative',.*?(\d+)\. (.*),$1 $2)`

---

<div class="post-metadata">

**Author:** ![macakcira](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@macakcira](https://community.mp3tag.de/u/macakcira)\
**Post date:** [June 18, 2023, 11:46am UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/11 "2023-06-18T11:46:26Z")

</div>

Oh a one-step solution!

Thank you:+1: 👍

---

<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:** [June 18, 2023, 12:07pm UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/12 "2023-06-18T12:07:19Z")

</div>

The original request was to rename the filename, from the end part of the title tag. However it seems the reverse Tag\>Filename converter doesn’t support the use of the %dummy% placeholder. I also could not get the Guess Values action to write to %\_filename% either.

The best I could come up with was a temp field using Guess Values, then using that field in the template for Tag\>Filename. The %track% field request later could have been added at this point.

But seems the regex solution in the following post is the more elegant way to go. Thanks for this @ohrenkino

---

<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:** [July 18, 2023, 12:07pm UTC](https://community.mp3tag.de/t/tag-to-filename-copy-right-part-of-the-title-starting-from-the-certain-character/61283/13 "2023-07-18T12:07:44Z")

</div>

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