# Enter a sequence number in the middle of a filename

**URL:** <https://community.mp3tag.de/t/enter-a-sequence-number-in-the-middle-of-a-filename/48841>\
**Category:** Support\
**Created:** [May 4, 2020, 8:28am UTC](https://community.mp3tag.de/t/enter-a-sequence-number-in-the-middle-of-a-filename/48841 "2020-05-04T08:28:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirrah](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sirrah/32/7613_2.png) [@sirrah](https://community.mp3tag.de/u/sirrah)\
**Post date:** [May 4, 2020, 8:28am UTC](https://community.mp3tag.de/t/enter-a-sequence-number-in-the-middle-of-a-filename/48841/1 "2020-05-04T08:28:42Z")

</div>

Hello,

I have a list of tracks which I would like to add a sequence number. Like this:

**FROM**  
Mass - Devotions before Mass - Antiphon. Kyrie eleison.mp3  
Mass - Devotions before Mass - Hymn and Psalm.mp3  
Mass - Devotions before Mass - Responsory, 'Alleluia'.mp3

**TO**  
Mass - 01 Devotions before Mass - Antiphon. Kyrie eleison.mp3  
Mass - 02 Devotions before Mass - Hymn and Psalm.mp3  
Mass - 03 Devotions before Mass - Responsory, 'Alleluia'.mp3

I tried the following:  
Convert \> Filename-Filename  
%1 - $num(%track%,2) %2

but only got this:  
Mass - 00 Devotions before Mass - Antiphon. Kyrie eleison.mp3  
Mass - 00 Devotions before Mass - Hymn and Psalm.mp3  
Mass - 00 Devotions before Mass - Responsory, 'Alleluia'.mp3

What did I do wrong?

Just "00" throughout!

I just want to do this to FILENAME not TITLE.

Please help....Thanks

---

<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:** [May 4, 2020, 8:36am UTC](https://community.mp3tag.de/t/enter-a-sequence-number-in-the-middle-of-a-filename/48841/2 "2020-05-04T08:36:43Z")

</div>

> [@sirrah](#):
>
> %1 - $num(%track%,2) %2

> [@sirrah](#):
>
> I just want to do this to FILENAME not TITLE.

The filename is one property, usually managed by the file system, the TITLE field is something that you edit with MP3tag.  
The field TRACK is a different field and separate from TITLE.  
Unless you have filled the field TRACK (e.g. with the track numbering assistant) you will always get a "0" as there is nothing in the field TRACK.  
If you have not yet filled the Tags, why not try it with Convert\>Filename-Tag before you add data that is not separated from the rest by a unique separator character?  
Format string: %artist% - %album% - %title%

Then you add the numbers and then you construct a new filename with Convert\>Tag-Filename  
Format string: %artist% \_ $num(%track%,2) \_ %album% \_ %title%  
(I think the underscore is a better separator than the hyphen as the hypen us frequently part of the field data)

In addition, I do not think that you can mix the %1..%9 address scheme with other variables.  
You would have to use an action of the type "Format value" or Convert\>Tag-Tag and a regular expression

---

<div class="post-metadata">

**Author:** ![sirrah](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sirrah/32/7613_2.png) [@sirrah](https://community.mp3tag.de/u/sirrah)\
**Post date:** [May 4, 2020, 9:03am UTC](https://community.mp3tag.de/t/enter-a-sequence-number-in-the-middle-of-a-filename/48841/3 "2020-05-04T09:03:41Z")

</div>

Hello,

Thanks for your reply.  
I don't quite follow what you are saying. I have already entered the track numbers, but still get "00".

If you could give me a more specific procedure guideline, I'd be very grateful

Here is a screen shot:

 ![Screenshot 2020-05-04 10.47.02](https://community.mp3tag.de/uploads/default/original/2X/c/c2d1ddff5d0586365bd16abdb5b89d2bf76fe0c6.png)

---

<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:** [May 4, 2020, 9:14am UTC](https://community.mp3tag.de/t/enter-a-sequence-number-in-the-middle-of-a-filename/48841/4 "2020-05-04T09:14:57Z")

</div>

As I see it, you write the contents of TITLE as filename.  
You could use Convert-Tag-Filename as this allows to enter format strings with full access to scripting functions and field variables - which Convert\>Filename-Filename does not have.

To get the number inserted, use Convert\>Tag-Filename with the suggest the following  
Format string: `$regexp(%title%,(.*?) - (.*),$1 - $num(%track%,2) $2)`  
which uses TRACK as number or if it should become a different sequence number:  
Format string: `$regexp(%title%,(.*?) - (.*),$1 - $num(%_counter%,2) $2)`

---

<div class="post-metadata">

**Author:** ![sirrah](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sirrah/32/7613_2.png) [@sirrah](https://community.mp3tag.de/u/sirrah)\
**Post date:** [May 4, 2020, 9:24am UTC](https://community.mp3tag.de/t/enter-a-sequence-number-in-the-middle-of-a-filename/48841/5 "2020-05-04T09:24:06Z")

</div>

Thank you!!  
I'm not up on scripting. So I'm doing a lot of experimenting, which takes up a lot of time (something that we have a lot of at the moment, unfortunately). But, thanks to your help I'm learning bit by bit.  
Bleib gesund!!

---

<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:28pm UTC](https://community.mp3tag.de/t/enter-a-sequence-number-in-the-middle-of-a-filename/48841/6 "2026-02-09T12:28:34Z")

</div>


