# Rename Filenames With Alphanumeric Track

**URL:** <https://community.mp3tag.de/t/rename-filenames-with-alphanumeric-track/58267>\
**Category:** Support\
**Created:** [August 21, 2022, 7:06pm UTC](https://community.mp3tag.de/t/rename-filenames-with-alphanumeric-track/58267 "2022-08-21T19:06:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DJ-AS](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dj-as/32/12083_2.png) [@DJ-AS](https://community.mp3tag.de/u/DJ-AS)\
**Post date:** [August 21, 2022, 7:06pm UTC](https://community.mp3tag.de/t/rename-filenames-with-alphanumeric-track/58267/1 "2022-08-21T19:06:09Z")

</div>

Hi! Is it possible or is there a way for mp3tag to detect if the track number is alphanumeric and not change it?  
Example:  
Original File: Joachim & Julien - Acid Beat  
Tag Filled: A1 Joachim Garraud & Julien Créance - Acid Beat (Original Mix)  
Rename File: 00 Joachim Garraud & Julien Créance - Acid Beat (Original Mix)

This is the syntax what i use:  
`%artist%\%year% - %album%\$num(%track%,2) %artist% - %title%`

I hope understand my question  
Thanks in advance

---

<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 21, 2022, 7:20pm UTC](https://community.mp3tag.de/t/rename-filenames-with-alphanumeric-track/58267/2 "2022-08-21T19:20:04Z")

</div>

Please note that the field TRACK should be numeric. The only exception is the slash to separate the total of files.

If you have created all track numbers with leading zeros, then you don't need the $num() function.  
An alternative would be to filter first for the files that are numeric and treat them with $num() and then filter for those with TRACK and an "A" and then those with a "B" and simply use %track%

---

<div class="post-metadata">

**Author:** ![DJ-AS](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dj-as/32/12083_2.png) [@DJ-AS](https://community.mp3tag.de/u/DJ-AS)\
**Post date:** [August 21, 2022, 7:26pm UTC](https://community.mp3tag.de/t/rename-filenames-with-alphanumeric-track/58267/3 "2022-08-21T19:26:20Z")

</div>

Yes, all my tracks have the leading zero, so just %track% is the solution!  
Thank you ohrenkino!

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [August 21, 2022, 7:31pm UTC](https://community.mp3tag.de/t/rename-filenames-with-alphanumeric-track/58267/4 "2022-08-21T19:31:34Z")

</div>

> [@DJ-AS](#):
>
> Is it possible or is there a way for mp3tag to detect if the track number is alphanumeric and not change it?

You could try `$isdigit`  
`$if($isdigit(%TRACK%),$num(%TRACK%,2),%TRACK%)`

or if your track has the format A4/18:  
`$if($isdigit(%TRACK%),$num(%TRACK%,2),$left(%TRACK%,2))`

---

<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 20, 2022, 7:31pm UTC](https://community.mp3tag.de/t/rename-filenames-with-alphanumeric-track/58267/5 "2022-09-20T19:31:42Z")

</div>

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