"Count" files in folder and set value?

Hi,

I can’t figure out how to count the total files in a album folder and set that value.

My folder structure is:

Music ==> Artist A ==>Album A

In folder “Album A” are all tracks of the album stored (not a subfolder/disc)

How can I set the total value from all tracks in that folder?

For example if I have a folder “Album A” :

disc 1: 20 files

disc 2: 10 files

= 30 files in that folder

I want to set the value 30 in all tracks from that folder.

Grrrtttzzz

I don’t think that’s possible. At least not by script.
Each file is processed separately and you can only get information which belongs to the file (the track).
Disc 2 files only have the disc number and the number of files on disc 2 but no information about the number of disc 1 files. I don’t see a chance to get the offset for numbering.

What’s wrong with numbering 1-01 to 1-20 and 2-01 to 2-10?

1 Like

I’m pretty sure you could do something with the Persistent Variables plugin.

2 Likes

I have not noticed this plugin. Didn’t work for me so far, but will be great when it works. :slight_smile:

Hi all,

thank for the feedback.

There are people that like there music tagged in 1-30 –>30/30

In my case I keep the original numbering :slight_smile:

My goal is next:

-Is my album is complete or not and do this in bulk.

-also without renumbering the track field (takes a manual handling to trigger trackwizard in mp3tag + script)

-without looking up the release up here in musicbrainz. (just load tracks and then execute a script)

The total amount of tracks for the release,that data i have already in mp3 tag.

I am able to retrieve the total folder files in mp3tag.

But this only possible at release level and not in bulk.

So my hope was to get the total files in the album folder here in musicbrainz..

Why I keep staring to the value 30 total tracks of a release?

This is the only way to flag the whole release and not 1 disc of the 2 in the release.

My plan B was allready:

When searching this forum I had read a few times that your script is able to renumber tracks and get the total there.

At the moment I allready run 3 plugins, run more plugins = slow down musicbrainz.

But I don’t have another option.

So I better take a look in that direction and proceed better in the topic there when I run in something.

thnx

You have to look deeper and follow the link to github.

there is a description of the variables that comes with this plugin

1 Like
$set_a(_tracknum,$if2($add($get_a(_tracknum),1),1))
$num($get_a(_tracknum),2) $if(%_multiartist%,%artist% - ,)%title%

This is a very simple approach. The tracks are numbered in succession. But it requires a complete album. Otherwise it will close gaps.

I know and that is the point :slight_smile:

In mp3tag I have already the total tracks when album is complete…

the plugin count the actual files and serve to verify if the total tracks in mp3tag are equal with those from the plugin :slight_smile: :slight_smile:

if i miss a track the plugin gives 29, mp3tag 30….

the plugin write 1/29-29/29, I grab the last 2 digits 29.

I don’tt need the tracknumber but only the amount of the total tracks

In mp3tag I can count too, but first i have to move the original tracknumber to a diffrend field in 1e script.

then I have to trigger manual that counter.

verify in 2e script and move original tracknumber back to it’s original field and delete the temperaly field

Here I can do this with 1 script and put the counted files in a tempfield witch deleted itselve when saving and unload the files