# How to get an incremental letter

**URL:** https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970
**Category:** Support
**Created:** [June 6, 2024, 1:40pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970 "2024-06-06T13:40:34Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![cmach1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/46a35a/32.png) [@cmach1](https://community.mp3tag.de/u/cmach1)
#### Post date: [June 6, 2024, 1:40pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970/1 "2024-06-06T13:40:34Z")

</div>

I want to insert a lowercase letter as the fourth character in a list of filenames. I thought I put the right string in, but it just gives me the same letter (in this case 'a') over and over again. I want the letter to increase by one for each file. So track 2 should have a 'b', track 3 a 'c', ect.

This is what I used: A1.$char($add($num(%1,1),97)) %2

The lowercase letter comes after A1.

The 97 indicates the lowercase 'a', but what am I not doing right to get that letter to increase for each file?

---

<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: [June 6, 2024, 1:44pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970/2 "2024-06-06T13:44:05Z")

</div>

> [@cmach1](#):
>
> A1.$char($add($num(%1,1),97)) %2

You could try it with  
`A1.$char($add($num(%TRACK%,1),97))`  
you should replace `%2` with the content of another tag like `%TITLE%` or `%ARTIST%`.  
This would produce  
`A1.b`  
`A1.c`  
`A1.d`

If you want to start with the lowercase letter `a`, you should start with the value 96 instead of 97.

---

<div class="post-metadata">

### Author: ![cmach1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/46a35a/32.png) [@cmach1](https://community.mp3tag.de/u/cmach1)
#### Post date: [June 6, 2024, 2:25pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970/3 "2024-06-06T14:25:52Z")

</div>

It still gives me the same repeated character. Also I need to use %2 because it retains the remainder of the filename.

---

<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: [June 6, 2024, 2:28pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970/4 "2024-06-06T14:28:09Z")

</div>

I can't help you further, unfortunately.

In my test, I load 3 tracks, choose Tag -\> Tag for \_FILENAME and use the above format string and it works as expected.

As said, I don't have your `%2` as I don't see how this could work and where the content should come from. But it does not repeat the same character. It start at `a` over `b` to `c` If I use 96 instead of 97.

---

<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 6, 2024, 2:44pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970/5 "2024-06-06T14:44:28Z")

</div>

You would have to supply the original filename, the pattern you used for the original filename and the pattern for the target filename.  
If A1 is the %1 part, then $num(%1,1) will always return 0 as value.

---

<div class="post-metadata">

### Author: ![cmach1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/46a35a/32.png) [@cmach1](https://community.mp3tag.de/u/cmach1)
#### Post date: [June 6, 2024, 3:24pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970/6 "2024-06-06T15:24:02Z")

</div>

> [@LyricsLover](#):
>
> I can't help you further, unfortunately.
> 
> In my test, I load 3 tracks, choose Tag -\> Tag for \_FILENAME and use the above format string and it works as expected.
> 
> As said, I don't have your `%2` as I don't see how this could work and where the content should come from. But it does not repeat the same character. It start at `a` over `b` to `c` If I use 96 instead of 97.

Okay, I see part of the problem. I wasn't doing it in Tag - Tag. I was doing it in Filename - Filename. The %1, %2 ect. values don't work in Tag - Tag, do they?

I should've mentioned which conversion section I was using. I used your code in Tag - Tag and added %TITLE% and got the result I needed. Thank you.

---

<div class="post-metadata">

### Author: ![cmach1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/46a35a/32.png) [@cmach1](https://community.mp3tag.de/u/cmach1)
#### Post date: [June 6, 2024, 3:30pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970/7 "2024-06-06T15:30:37Z")

</div>

> [@ohrenkino](#):
>
> You would have to supply the original filename, the pattern you used for the original filename and the pattern for the target filename.  
> If A1 is the %1 part, then $num(%1,1) will always return 0 as value.

The original filenames are:  
A1 Computaform  
A2 Computaform  
A3 Computaform  
A4 Computaform

But I wanted all of those files to start with A1. followed by an incremental letter. So they would end up like this:

A1.a Computaform  
A1.b Computaform  
A1.c Computaform  
A1.d Computaform

So the "A1." was manually typed in by me. I just needed the rest of the string to make the lowercase letter adjust incrementally.

My issue was trying it in Filename - Filename, when I should've done it in Tag - Tag.

---

<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: [July 6, 2024, 3:35pm UTC](https://community.mp3tag.de/t/how-to-get-an-incremental-letter/64970/9 "2024-07-06T15:35:22Z")

</div>

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