# Help using the Tag - Filename tool

**URL:** <https://community.mp3tag.de/t/help-using-the-tag-filename-tool/46284>\
**Category:** Support\
**Created:** [August 30, 2019, 1:16am UTC](https://community.mp3tag.de/t/help-using-the-tag-filename-tool/46284 "2019-08-30T01:16:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Mendelli](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ebca7d/32.png) [@Mr\_Mendelli](https://community.mp3tag.de/u/Mr_Mendelli)\
**Post date:** [August 30, 2019, 1:16am UTC](https://community.mp3tag.de/t/help-using-the-tag-filename-tool/46284/1 "2019-08-30T01:16:43Z")

</div>

I'm trying to sort my filenames by track number in a specific format. I want to sort by the track name then the title like so:

`0%track%. %title%` _(06. Capital G (Epworth Phones).mp3)_

The issue I'm having is that I add my tracks in this format:

`%track%/TOTAL.` eg: _(6/14)_

When I try to apply the sorting method it adds `0%track%/TOTAL.` so I end up with file names like this:

`0614. Capital G (Epworth Phones).mp3`

`0614` is technically 06/14 because forward slashes are not allowed in filenames. I only want the number _before_ the slash to be added to the filename, what syntax is needed to achieve this?

---

<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:** [August 30, 2019, 5:03am UTC](https://community.mp3tag.de/t/help-using-the-tag-filename-tool/46284/2 "2019-08-30T05:03:27Z")

</div>

To convert strings to numbers and add zeros as padding, use  
`$num(%track%,2)`  
So, this kind of format string

> [@Mr\_Mendelli](#):
>
> 0%track%

would become obsolete.

---

<div class="post-metadata">

**Author:** ![Mr\_Mendelli](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ebca7d/32.png) [@Mr\_Mendelli](https://community.mp3tag.de/u/Mr_Mendelli)\
**Post date:** [August 30, 2019, 5:46am UTC](https://community.mp3tag.de/t/help-using-the-tag-filename-tool/46284/3 "2019-08-30T05:46:43Z")

</div>

> [@ohrenkino](#):
>
> $num(%track%,2)

Worked exactly as I wanted, thank you! I also added a decimal to match the intended format:

`$num(%track%,2). %title%`

---

<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:** [September 29, 2019, 5:46am UTC](https://community.mp3tag.de/t/help-using-the-tag-filename-tool/46284/4 "2019-09-29T05:46:46Z")

</div>

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