Compare TOTALTRACKS to number of files in folder


#1

Hi,

is there some way to compare the number of mp3 files in a folder to the content of %totaltracks% of any of the mp3 files within the folder?
I'm currently revamping my collection and the first step i'd like to do is to seperate folders with too many/few mp3s.
If they don't match some kind of marking would be useful - e.g. in the form of an extra tag like %totaltracksdisparity% = 1 or in form of some string added to the folder name. Ideally this could be done for a large number of folders at once.

Ideas?


#2

I do not quite know where the data for comparison should come from. have you filled all totaltracks fields?

Now, what I could think of:
as there is no function within MP3tag except the track numbering wizard that knows anything about folders and total numbers, I can only think of using this wizard to find out the actual number.

But first: save the current track number to a user-defined field
Then start the numbering wizard to let it renumber each folder.
Now compare (with a filter) the old track number in the user-defined field with the newly generated track number. If they do not match then you have a gap somewhere in the files list in that folder/album.

Whe you are done, you can copy back the old track number from the user-defined field


#3

Yeah, in all cases I have the correct number of tracks stored in the TOTALTRACKS tag. At least that's how foobar calls the tag. In Mp3tag I access it via reading the number that comes after the character "/" in TRACK, to get i.e. the "20" in "07/20". So it looks like that: $right(%TRACK%,$sub($len(%TRACK%),$strchr(%TRACK%,/)))

Anyway, your idea of copying the original contents and using the wizard is working, thanks!