# \[F\] \_Counter starting at zero?

**URL:** https://community.mp3tag.de/t/f-counter-starting-at-zero/14487
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [February 24, 2013, 10:42pm UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487 "2013-02-24T22:42:22Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![BrotherDave](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/43a26b/32.png) [@BrotherDave](https://community.mp3tag.de/u/BrotherDave)
#### Post date: [February 24, 2013, 10:42pm UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/1 "2013-02-24T22:42:22Z")

</div>

I'm using tag-\>tag to give my titles a trailing number. Currently the files are lectures and all have the same title so I just want to add a sequence number at the end of each.

The [Convert tags from/to filenames](https://docs.mp3tag.de/converters/rename-files) page says %\_counter% should start at 1. For me it's starting at zero. (I'm using mp3tag v.2.54. on Win7.)

Could I be doing something wrong?  
Is there a way to get it to start at 1?

(I suppose I could make a dummy leading file to get the first 0 and I can imagine ways to get what I want by using autonumber to shove the numbers I need into the track field and clean up the track field later, but I'm trying to do it the "right" way first.)

Thanks,  
Dave

---

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [February 24, 2013, 10:58pm UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/2 "2013-02-24T22:58:46Z")

</div>

I assume you're trying to set both the TITLE field and the filename. If you want to do both, create an Action Group consisting of two actions:

1. 

_Action type:_ **Format value**  
_Field:_ **TITLE**  
_Format string:_ **%title% $num(%track%,2)**

1. 

_Action type:_ **Format value**  
_Field:_ **\_FILENAME**  
_Format string:_ **$num(%track%,2) %title%**

Then, instead of using a converter, use the auto-numbering wizard (Tools, Ctrl-K or ![:mt_trackwiz:](https://community.mp3tag.de/uploads/default/original/1X/fcf97a0c706e2b7e25f47869511be942ac5d9e8c.png ":mt\_trackwiz:")) to set the TRACK field (no need for a leading zero here). After you've set TRACK, run the action group above.

Just take care not to run the action group twice, or it will append the track number twice. If need be, you can work around that, though.

---

<div class="post-metadata">

### Author: ![BrotherDave](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/43a26b/32.png) [@BrotherDave](https://community.mp3tag.de/u/BrotherDave)
#### Post date: [February 24, 2013, 11:36pm UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/3 "2013-02-24T23:36:54Z")

</div>

Thanks JJ, I probably will eventually have to update the filename.

But in my case there's a problem with simply using the %track% variable: half the files in the folder are lecture 1 and half are for lecture 2. Thus, while the track number increments on all files the "part" number of each lecture resets for the second half of the file. (e.g. lect1 pt 1, lect 1 pt2, ..., lect2 pt1, lect 2 pt2,...)

However I can use the track varalbe as a temp varable and mung it for now and reset it later (though doing that means one-off managing of each folder.)

But is %\_counter% supposed to start at 1 or zero? Seems either a doc bug or a code bug (or possibly operator error.) If I can get \_counter to start at 1 I can just select the set of files in a given lecture and zap them with the \_counter suffix.

Make sense?

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [February 24, 2013, 11:38pm UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/4 "2013-02-24T23:38:05Z")

</div>

The Preview at tag-\>tag is broken, but the tagging should work and %\_counter% starts from 1

---

<div class="post-metadata">

### Author: ![BrotherDave](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/43a26b/32.png) [@BrotherDave](https://community.mp3tag.de/u/BrotherDave)
#### Post date: [February 25, 2013, 12:07am UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/5 "2013-02-25T00:07:04Z")

</div>

Ah, that works - I should have tried it once since counter seemed popular enough in the forums.

Thanks all,  
Dave

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [April 8, 2013, 4:49am UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/6 "2013-04-08T04:49:39Z")

</div>

I've fixed the preview with the latest [Development Build](http://developer.mp3tag.de).

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [April 8, 2013, 5:17am UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/7 "2013-04-08T05:17:59Z")

</div>

It's not fixed when you click on "Preview"

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [April 9, 2013, 3:58pm UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/8 "2013-04-09T15:58:38Z")

</div>

Thanks dano, it should be [fixed](http://developer.mp3tag.de) now.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 28, 2018, 2:06pm UTC](https://community.mp3tag.de/t/f-counter-starting-at-zero/14487/9 "2018-12-28T14:06:41Z")

</div>

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