automatic detect multidisk in "tag to filename" conversion


#1

Hi all, im starting a new thread with a followup question based on garym's recommendation.
As the title suggests im creating folder structures from my tags and am going for the structure of:
For single or 2 disc albums:
%Artist%/%Album%(with year(if applicable))/%track% - %title

For albums with 3 or more discs:
%Artist%/%Album%(with year(if applicable))/disc#/%track% - %title

This is what ive got so far:
C:\Music\%artist%\%album%$num(%track%,2) - %title%

Just stuck with how to edit this to do what i want - hope i made this clear.

Was also wondering if it is possible to detect if discs of the same album are called something different ie:
disc1: SH1-sounds
disc2: SH1-noise
As in these are the same album but the discs are called something seperate so i want the album to be SH1 with 2 discs inside the folder called sounds and noise.
Think this may be too much to detect automatically so i think this may be something i have to do manually.

Thanks


#2

If you have the Discnumber tag filled you can use this:

C:\Music\\%artist%\\%album%[ - %year%]\$ifgreater($num(%discnumber%,1),2,$num(%discnumber%,1)\,)$num(%track%,2) - %title%

For the second question: It's not possible to compare different files within the scripting.


#3

Hi dano - thanks for the response. That dosn't quite achieve what i was looking for.
I mean if there are 1 or 2 discs all tracks are put here:
artist - album - tracks

however if there are 3 or more discs put each track for each disc in a corresponding folder:
artist - album - disc1 folder, disc2 folder, disc3 folder (each folder containing corresponding tracks)

After using this on a 4 disc album i got this:
Artist - album - tracks (for disc 1 and 2) and 2 folders called 3 and 4 containing the tracks for disc 3 and 4.

Sorry if i wasnt clear.


#4

You are right. I overlooked that we need to check the total disc count.
So the question is do you have that info saved in a tag as well?
Like Discnumber = 1/4 ?


#5

yep, albums that are just 1 disc i have no field for discnumber.
All albums that that contain more than 1 disc have discnumber field saved correctly


#6

Now a new disc folder is only created if there's a discnumber tag like 1/4 with at least 3 total discs:

C:\Music\\%artist%\\%album%[ - %year%]\$ifgreater($regexp(%discnumber%,'^\d+(/|$)',),2,$num(%discnumber%,1)\,)$num(%track%,2) - %title%

#7

awesome, looks like its working! thanks dano


#8

Hi, i was wondering if you could help me make a small change to this:
C:\Music\%artist%\%album%[ - %year%]$ifgreater($regexp(%discnumber%,'^\d+(/|$)',),2,$num(%discnumber%,1),)$num(%track%,2) - %title%
In the \%labum% section is it possible to say if you find a ":"(without quote marks) replace with a " - "
Just because windows wont allow for ":" so when the folder is created it would be better to replace it with a " - " Is this possible?


#9

have a look at the $validate function.
if you want to be sure you could modify the mask like this:
C:\Music$validate(%artist%\%album%[ - %year%]$ifgreater($regexp(%discnumber%,'^\d+(/|$)',),2,$num(%discnumber%,1),)$num(%track%,2) - %title%)


#10

Ah nice, will this affect filenames etc, or just where symbols are invalid like folder names?


#11

I don't understand. No, it does not affect existing filenames. And everything else will be revealed to you by having a glance at the online help.