[SOLVED] Auto-numbering total tracks on a per-folder basis

My first post here: hi all of you!

After a lot of search with no result I wonder if there is a way in order to write track number in x/x format using the total tracks Tag-Tag Convert function on a per-folder basis...

Running 2.79 version and using the following string:


the program seems perfectly able to write track numbers and total tracks, but only for ALL files selected just as if they were in a single folder/album and then I do not know if there is a way to write total tracks number resetting total tracks autonumbering for each sub-folder.

Any addressing will be more than appreciated.

Many thanks in advance.

Answered a few days ago.

Actions question

Thanks stevehero, but I'm not sure if there was a misunderstanding...

Currently I have a "Rock" folder containing a lot of sub-folders named as each Artist/Album title.
All tags of all audio-files are already written.
Now I want to set all Track numbers followed by Total Tracks number of each folder/album letting the existing track numbers and "simply" adding the folder/album related Total Tracks number.
Running Mp3tag (2.79) and select "Rock" directory then ALL files existing in all sub-folders result as selected.
Using "Convert > Tag - Tag" function with the following string
it does renumber ALL tracks in ascending order and then add a related Total Tracks number that does result as incorrect because it does consider all selected files like in a single folder.
If I add each sub-directory individually then that way does work correctly, but I do not want to select individually over than 750 sub-folders.
May be it is a mission impossible...

This can be done natively by CTRL+K or :mt_trackwiz: with reset counter for each dir enabled.

It works on a per folder basis. Regardless of the hierarchy of the files.

Maybe I'm still picking up wrong.

Many thanks for your appreciated reply, but I thought that myself was wrong not even you!

Anyway, I already tried that way and results are just as in the attached screenshot (related to 2 folders/albums only just to show results): please, where am I wrong?

You would have to sort the files by _DIRECTORY so that all files from one folder come together as a group.
So: first sort them by track, then by _directory.

Yes, that way it does work: so many thanks, ohrenkino!

Thanks all of you.

You can change the default behaviour of how the columns sort by using something like ohrenkino mentioned only translated to the column setup.

Here's my sort entry for the album column for example. Takes into consideration formats as I may have mp3s or FLACs so they need them to be sorted in order too.

%album% %_extension% %discnumber% %track% %_directory%

So you could use something like:

%discnumber% %track% %_directory%

This would be the same as clicking the discnumber column, then track then _directory

Right mouse click on the column to edit this, see: Sort by.

Many thanks for your informative post!

In my specific case since the player in my car shows the disc number of FLAC files even if it is 1/1 I've removed disc number at all from tags "replacing" that with a custom file naming/tagging that does include the 2+ disc possible info and all album-folders are named by alphanumeric.

So it has been enough for me adding a "Path" column at the end of the line and clicking on it...

However, really a great program!

Thank you all

Hi all!

Strange enough after about 5 months from the described (and solved) issue now it seems that I'm no longer able to convert TRACK tags to x/x format (on a per-folder basis, of course)...
Using the usual string $num(%TRACK%,1)/$num(%_COUNTER%,1) it writes the TOTAL track number ignoring the per-folder basis instruction (please look at the sshot in attachment): why?

Any suggestion more than welcome!

Mp3tag v2.85

None except the track numbering wizard knows anything about directory change.

So, %_counter% counts all the selected files and does not reset at a folder boundary.
You either select only files of one folder and apply the action or use the track numbering wizard.
Also, I think that the variable to count the total number of files should not be %_counter% but %_total_files%.

Yes, you're right ohrenkino and it does work great!
Sorry, but after 5 months I did not well-remember the issue...
Thank you so very much!!!