# How to auto-number files?

**URL:** https://community.mp3tag.de/t/how-to-auto-number-files/3106
**Category:** General Discussion
**Created:** [March 29, 2006, 9:15am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106 "2006-03-29T09:15:06Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [March 29, 2006, 9:15am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/1 "2006-03-29T09:15:06Z")

</div>

How can I access a number representing the position of the file in the file list? E.g. to use an action to autonumber the files in the current sort order? Thanks.

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [March 29, 2006, 9:33am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/2 "2006-03-29T09:33:50Z")

</div>

You can use the auto-numbering wizard ![:mt_trackwiz:](https://community.mp3tag.de/uploads/default/original/1X/fcf97a0c706e2b7e25f47869511be942ac5d9e8c.png ":mt\_trackwiz:") (CTRL+K or Tools, Auto-numbering wizard).

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [March 29, 2006, 9:43am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/3 "2006-03-29T09:43:05Z")

</div>

Thanks, but I want to access the number myself, so I can e.g. use it in an action.

e.g. %filenumber%

---

<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: [March 29, 2006, 10:15am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/4 "2006-03-29T10:15:41Z")

</div>

%\_counter%

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [March 29, 2006, 11:13am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/5 "2006-03-29T11:13:46Z")

</div>

Brilliant! Thanks.

Suggestions for improvement:

1. Make %\_counter% work in file view columns
2. Make %\_counter% work in Tag - Filename dialog box sample
3. Add %\_counter% to Help, e.g. Tag - Filename format string.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 13, 2014, 8:22pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/6 "2014-09-13T20:22:54Z")

</div>

> [@chrisjj](#):
>
> 1. Make %\_counter% work in file view columns
> 2. Make %\_counter% work in Tag - Filename dialog box sample
> 3. Add %\_counter% to Help, e.g. Tag - Filename format string.

FTR, on V2.62  
1 still does not work  
2 works: [http://i.imgur.com/OIgoRWP.png](http://i.imgur.com/OIgoRWP.png)  
3 done: [https://web.archive.org/web/20140914114219/...verter.html?ttf](https://web.archive.org/web/20140914114219/https://docs.mp3tag.de/converters?ttf)

Thanks Florian.

I hope you can do 1.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [September 14, 2014, 6:37am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/7 "2014-09-14T06:37:46Z")

</div>

> [@chrisjj](#):
>
> ... I hope ...

Annotation to 2:  
Please store relevant pictures to the Mp3tag server.

Annotation to 3:  
The link does not work ...  
[https://docs.mp3tag.de/converters%23ttf](https://docs.mp3tag.de/converters%23ttf)  
_The requested URL /main\_converter.html#ttf was not found on this server._

DD.20140914.1037.CEST

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 14, 2014, 9:47am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/8 "2014-09-14T09:47:33Z")

</div>

> [@DetlevD](#):
>
> Please store relevant pictures to the Mp3tag server.

If I have the address of a picture, I paste it into the forum message and it appears as a link. I presume if the forum needed the picture on its own server, it would copy it. But I would not be happy with that. I prefer my material to be under my control, to allow me to e.g. delete the wrong picture posted in error.

> [@DetlevD](#):
>
> The link does not work ...

Thanks. Corrected.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [September 14, 2014, 10:25am UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/9 "2014-09-14T10:25:23Z")

</div>

> [@chrisjj](#):
>
> If I have the address of a picture, I paste it into the forum message and it appears as a link. I presume if the forum needed the picture on its own server, it would copy it. ...

??? How should any forum machine have any rights to fetch any pictures from anywhere, from which you are the owner ??? (... leave the known search machines aside)  
A public forum has somewhat of a private place, in the meaning that registering is required, and someone can/should trust the owner of the site.

> [@chrisjj](#):
>
> ... I prefer my material to be under my control, to allow me to e.g. delete the wrong picture posted in error. ...

You have full control about your data in the Mp3tag forum, because your words and pictures are always stored at and reachable under the Mp3tag server address.

DD.20140914.1425.CEST, DD.20140914.1825.CEST

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 14, 2014, 2:13pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/10 "2014-09-14T14:13:29Z")

</div>

> [@DetlevD](#):
>
> ??? How should any forum machine have any rights to fetch any pictures from anywhere, from which you are the owner ???

It would ask for permission. E.g. in the sign-up.

> [@DetlevD](#):
>
> A forum is a private place.

I thought this forum was a public place. But perhaps our difference here is due only to translation of the words.

> [@DetlevD](#):
>
> You have full control about your data in the Mp3tag forum, because your words and pictures are always stored at and reachable under the Mp3tag server address.

Perhaps. Since this forum software does not provide me a list of my pictures AFACIT, that is not possibly for me to verify. Forum software such as this is something I am not comfortable relying on. Plus it does not give me the control that lets the picture at a quickly pasted address be stored on the forum.

---

<div class="post-metadata">

### Author: ![Zontir](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zontir/32/473_2.png) [@Zontir](https://community.mp3tag.de/u/Zontir)
#### Post date: [October 7, 2018, 3:19pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/11 "2018-10-07T15:19:02Z")

</div>

This gives me a single number format, but I want to stay depending on how many files I list. For example in an album where there are 10 files, I want the first to be 1/10 and the last 10/10

Something [like this](https://community.mp3tag.de/t/regular-expressions/521/5?u=zontir), but in an inverted way.

How can I accomplish this?

---

<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: [October 7, 2018, 4:02pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/12 "2018-10-07T16:02:36Z")

</div>

> [@Zontir](#):
>
> This

What are you referring to?  
On the problem of leading zeros see e.g.

> [@Remove leading zeros](https://community.mp3tag.de/t/remove-leading-zeros/14154/7):
>
> You can't use a function in a converter. Generally, you would first parse the name and end up with 01, 02, etc. in the TRACK field. Then you would apply the function to clean up the TRACK field using an action. After using the Filename-Tag converter you could use a Format value action in either a saved Action group or through an Action (Quick): Action type: Format value Field: TRACK Format string: $fmtNum(%track%) OR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .…

---

<div class="post-metadata">

### Author: ![Zontir](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zontir/32/473_2.png) [@Zontir](https://community.mp3tag.de/u/Zontir)
#### Post date: [October 7, 2018, 4:25pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/13 "2018-10-07T16:25:15Z")

</div>

> [@ohrenkino](#):
>
> What are you referring to?

I'm not talking about zeros, I never mentioned zeros in my question.  
I mean that %\_counter% only gives me the track number, but not the total number of tracks as iTunes does.  
As I mentioned in the previous post if I have an album with 10 files I want the track number of each music is as follows.  
1/10  
2/10  
3/10  
4/10  
.  
.  
.  
10/10

But if I use %\_counter% it only gives me the numbers just like this  
1  
2  
3  
4  
.  
.  
.  
10

---

<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: [October 7, 2018, 4:29pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/14 "2018-10-07T16:29:21Z")

</div>

The easiest way would still be to use the track-numbering assistant.

See also this thread on the total number of files:

> [@Auto number tracks with or without leading zeroes, depending on track number in album](https://community.mp3tag.de/t/auto-number-tracks-with-or-without-leading-zeroes-depending-on-track-number-in-album/43089/3):
>
> Extracting the total number can be done via the synthetic field %\_total% (for track numbers in #/## format).

---

<div class="post-metadata">

### Author: ![Zontir](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zontir/32/473_2.png) [@Zontir](https://community.mp3tag.de/u/Zontir)
#### Post date: [October 7, 2018, 4:51pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/15 "2018-10-07T16:51:21Z")

</div>

> [@ohrenkino](#):
>
> The easiest way would still be to use the track-numbering assistant.

Where is this assistant?

> [@ohrenkino](#):
>
> See also this thread on the total number of files

I read it, but I didn't understand much, my language isn't English and the translator doesn't translate it very well, so whatever I understood that I used something like this in a "Format Value" action in the TRACK %\_counter%/%\_total% field but it doesn't work for me.

---

<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: [October 7, 2018, 5:01pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/16 "2018-10-07T17:01:33Z")

</div>

> [@Zontir](#):
>
> Where is this assistant?

You find this function in the Options menu or in the toolbar fairly far on the right side.

It could be that the variable %\_total\_files% suits your purpose better. It returns the number of selected files.

---

<div class="post-metadata">

### Author: ![Zontir](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zontir/32/473_2.png) [@Zontir](https://community.mp3tag.de/u/Zontir)
#### Post date: [October 7, 2018, 5:32pm UTC](https://community.mp3tag.de/t/how-to-auto-number-files/3106/17 "2018-10-07T17:32:59Z")

</div>

> [@ohrenkino](#):
>
> You find this function in the Options menu or in the toolbar fairly far on the right side.

Excellent, just what I wanted. I knew this existed, but I didn't know where to look. I've gone blind.

> [@ohrenkino](#):
>
> It could be that the variable %\_total\_files% suits your purpose better. It returns the number of selected files.

Thank you also for this, it has given me an idea of how to do it with a function as follows:  
$num(%track%,2)/$num(%\_total\_files%,2)

Thanks you so much
