# Replacing leading number in Filename with incremental letters over 26

**URL:** https://community.mp3tag.de/t/replacing-leading-number-in-filename-with-incremental-letters-over-26/65551
**Category:** Support
**Created:** [August 10, 2024, 9:57pm UTC](https://community.mp3tag.de/t/replacing-leading-number-in-filename-with-incremental-letters-over-26/65551 "2024-08-10T21:57:26Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![walb77](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/4da419/32.png) [@walb77](https://community.mp3tag.de/u/walb77)
#### Post date: [August 10, 2024, 9:57pm UTC](https://community.mp3tag.de/t/replacing-leading-number-in-filename-with-incremental-letters-over-26/65551/1 "2024-08-10T21:57:26Z")

</div>

Hello,  
I am trying to get my Apple Watch to keep my audiobook chapters in order using the iCatcher app. iCatcher on my watch uses A-Z (lexicographical) for sorting instead of numbers. Using Mp3tag to sort, I've had luck using "Convert \> Filename - Filename" and entering  
Old filename:  
%1 - %2 - %3

New filename:  
$char($add($num(%1,1),64)) - %2 - %3

This works just fine for audiobooks with 26 or less chapters. This gives me chapter or file names with uppercase letters A-Z. But any audiobook with \> 26 chapters gives me ASCII characters instead of incremental letters (lowercase a-z) which is what I am trying to get.

In other words, I want to be able to sort files A-Z for the first 26 files then a-z for the reminding files. Any ideas? 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: [August 11, 2024, 6:17am UTC](https://community.mp3tag.de/t/replacing-leading-number-in-filename-with-incremental-letters-over-26/65551/2 "2024-08-11T06:17:45Z")

</div>

As numbers are also ansi characters, I wonder whether the watch really ignores these when sorting a filename - does it really throw those parts away?

After you reached the magic first 26 characters plus the next bunch you are restricted to 52 files maximum - which is also probably not enough for a fair number of audiobooks.

The easiest way would be:  
filter for files with a track number greater 26 and apply the function with a different offset.

---

<div class="post-metadata">

### Author: ![walb77](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/4da419/32.png) [@walb77](https://community.mp3tag.de/u/walb77)
#### Post date: [August 11, 2024, 4:50pm UTC](https://community.mp3tag.de/t/replacing-leading-number-in-filename-with-incremental-letters-over-26/65551/3 "2024-08-11T16:50:35Z")

</div>

Thanks for the help ohrenkino. I am trying your solution. Also, I had a typo in my question. I used "ansi characters" when I meant "ASCII characters." Just for clarification. Thanks again.

---

<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 11, 2024, 5:07pm UTC](https://community.mp3tag.de/t/replacing-leading-number-in-filename-with-incremental-letters-over-26/65551/4 "2024-08-11T17:07:13Z")

</div>

What happens with filenames like  
A001  
A002  
A003  
do these get sorted correctly?

---

<div class="post-metadata">

### Author: ![walb77](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/4da419/32.png) [@walb77](https://community.mp3tag.de/u/walb77)
#### Post date: [August 12, 2024, 11:34pm UTC](https://community.mp3tag.de/t/replacing-leading-number-in-filename-with-incremental-letters-over-26/65551/5 "2024-08-12T23:34:23Z")

</div>

Oh yes, that works. They sort correctly. Thanks for your solution ohrenkino. You have been very helpful. BTW, your Akai GX77 brings back fond memories of my X-165D I bought in the early '70s and still have downstairs.

---

<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 11, 2024, 11:34pm UTC](https://community.mp3tag.de/t/replacing-leading-number-in-filename-with-incremental-letters-over-26/65551/6 "2024-09-11T23:34:58Z")

</div>

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