# Indicate a character that has an incremental pattern

**URL:** https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756
**Category:** Support
**Created:** [May 22, 2024, 7:29pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756 "2024-05-22T19:29:54Z")
**Posts on this page:** 11
**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: [May 22, 2024, 7:29pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/1 "2024-05-22T19:29:54Z")

</div>

I'm trying to do a replace action by inserting a zero before any track number that's lower than 10. These are vinyl rips, so every track name either starts with an A or B depending on which side of the record they're on.

I want the zero to go between the A or B and the track number. However if the track name also has an A or B it gets an unwanted zero added to it and I have to manually delete those.

This is a similar question to what I asked yesterday, but what is the code to only effect one instance of the character I want to change?

Also is there a batch process I can use to put a zero in front of only numbers 1-9, but exclude the zero from 10 or higher?

---

<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 22, 2024, 7:52pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/2 "2024-05-22T19:52:46Z")

</div>

> [@cmach1](#):
>
> Also is there a batch process I can use to put a zero in front of only numbers 1-9, but exclude the zero from 10 or higher?

Try the function $num(Number\_expression,2) which outputs 2-digit numbers.

> [@cmach1](#):
>
> track name

Are you talking about the field TITLE or the filename?  
Could you give us an example of the A or B tag data, what it looks like now and what it should look like?

---

<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: [May 22, 2024, 8:18pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/3 "2024-05-22T20:18:12Z")

</div>

[quote=" [ohrenkino]"]  
Are you talking about the field TITLE or the filename?  
Could you give us an example of the A or B tag data, what it looks like now and what it should look like?[/quote]

It's in the filename column. Here's the file list in mp3tag without zeros on tracks A1-A9 and B1-B9:

 ![without zeros](https://community.mp3tag.de/uploads/default/original/3X/f/c/fce1b3b4659cc62332c55ba0a53889cf169483a1.jpeg)

And here is the same list with those files with a zero between the starting letter and single digit number:

 ![with zeros](https://community.mp3tag.de/uploads/default/original/3X/e/8/e83391acc8721754bb3a61f6c19dbe02f86353dc.jpeg)

This is essentially what I want the finished list to look like.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [May 22, 2024, 8:18pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/4 "2024-05-22T20:18:50Z")

</div>

> [@cmach1](#):
>
> These are vinyl rips, so every track name either starts with an A or B depending on which side of the record they're on.

The official spec for TRACK is to be a number only. Some file types tolerate if you add a letter like A1 or A01, but others like m4a will not allow it.

---

<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 22, 2024, 8:32pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/5 "2024-05-22T20:32:33Z")

</div>

Thank you for the screenshots.

> [@ohrenkino](#):
>
> Could you give us an example of the A or B tag data

As the filename is no tag but a property that is only required by the filename, It would come in handy to see what the field TRACK looks like and the format string with which you create the filename from tags.

---

<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: [May 22, 2024, 8:55pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/6 "2024-05-22T20:55:40Z")

</div>

Here's the same list with the TRACK field included:

 ![track list](https://community.mp3tag.de/uploads/default/original/3X/9/0/909a5475cf377550d5b575d929bb9b9ef83d858f.jpeg)

These are the strings used to create the filenames for this album:  
For the A side  
**A$num(Number\_expression,)$cutleft(%\_filename%, 1)**

For the B side  
**B$num(Number\_expression,)$cutleft(%\_filename%, 1)**

---

<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 22, 2024, 8:58pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/7 "2024-05-22T20:58:42Z")

</div>

> [@cmach1](#):
>
> A$num(Number\_expression,)

This would have to become `A$num(%track%,2)`

---

<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: [May 22, 2024, 8:59pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/8 "2024-05-22T20:59:27Z")

</div>

> [@MotleyG](#):
>
> The official spec for TRACK is to be a number only. Some file types tolerate if you add a letter like A1 or A01, but others like m4a will not allow it.

I'm not putting A1, A2, B1, B2, ect. in the track field. Only at the beginning of filenames. I'm keeping the track field strictly numerical.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [May 22, 2024, 9:17pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/9 "2024-05-22T21:17:05Z")

</div>

OK that makes it easier to work with. Is there a field you are using to store the album side info? Or is this a manual process only? Just trying to figure out how to automate this easier for 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: [May 22, 2024, 11:53pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/10 "2024-05-22T23:53:28Z")

</div>

> [@ohrenkino](#):
>
> This would have to become `A$num(%track%,2)`

That's what I wanted. Thank you.

---

<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: [June 21, 2024, 11:54pm UTC](https://community.mp3tag.de/t/indicate-a-character-that-has-an-incremental-pattern/64756/11 "2024-06-21T23:54:25Z")

</div>

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