# How to convert Track Tag from end of filename?

**URL:** <https://community.mp3tag.de/t/how-to-convert-track-tag-from-end-of-filename/15796>\
**Category:** Support\
**Created:** [June 10, 2014, 4:13am UTC](https://community.mp3tag.de/t/how-to-convert-track-tag-from-end-of-filename/15796 "2014-06-10T04:13:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![globetrotting](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/e68b1a/32.png) [@globetrotting](https://community.mp3tag.de/u/globetrotting)\
**Post date:** [June 10, 2014, 4:13am UTC](https://community.mp3tag.de/t/how-to-convert-track-tag-from-end-of-filename/15796/1 "2014-06-10T04:13:15Z")

</div>

Hi,

I read a lot, but couldn't find a solution to extract the Track Tag from filenames of different formats, where the only common rule is, that the track numbers are the last two digits before the common extension .mp3, like so:

**%dummy% - %dummy% - xx.mp3**  
   
where **xx** ist the track number and the number of dummies may differ.

I tried several variations of a new Guessing Value Action as mentioned on [/t/11802/1](https://community.mp3tag.de/t/11802/1) :

Source format \> %\_filename\_ext%  
Guessing Pattern \> %dummy% - %track%.mp3

but it didn't work, mainly because the number of dummies varies, i.e.

**%dummy% - %dummy% - %dummy% - xx.mp3**   
or  
**%dummy% - %dummy% - %dummy% - %dummy% - xx.mp3**

How do I tell mp3tag to take the last 2 digits just before .mp3 of the filename and to write them in the Track Tag?

Thx for help 🙂

---

<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 10, 2014, 4:29am UTC](https://community.mp3tag.de/t/how-to-convert-track-tag-from-end-of-filename/15796/2 "2014-06-10T04:29:53Z")

</div>

> [@globetrotting](#):
>
> ...  
> How do I tell mp3tag to take the last 2 digits just before .mp3 of the filename and to write them in the Track Tag?
> 
> Thx for help 🙂

Try a format value action for TRACK  
Enter as format string: $right(%\_filename%,2)

---

<div class="post-metadata">

**Author:** ![globetrotting](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/e68b1a/32.png) [@globetrotting](https://community.mp3tag.de/u/globetrotting)\
**Post date:** [June 10, 2014, 2:22pm UTC](https://community.mp3tag.de/t/how-to-convert-track-tag-from-end-of-filename/15796/3 "2014-06-10T14:22:30Z")

</div>

Genius, Thx!

---

<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:** [February 9, 2026, 12:25pm UTC](https://community.mp3tag.de/t/how-to-convert-track-tag-from-end-of-filename/15796/4 "2026-02-09T12:25:05Z")

</div>


