Multiple discs in separate folders

Hello, I am sorting my music archives, renaming directories and tags, and I am stuck on the problem of multiple CDs in multiple directories.
Is it possible to create automatically a directory by CD, if there are multiple CD tagged (like "\album\Disc01", "\album\Disc02" etc) and keep the usual folder naming if there is just one disc ?

I am here for the moment:
Format value:
_Directory
Format string:
%ARTIST% - %YEAR% - %ALBUM% $ifgreater($strstr(FLACWAV,$upper(%_extension%)),0,$upper((%_extension%)),(%_bitrate% kbps))

This works great, exactly as I want it to... for one album with only one disc.
How to, depending on the number of discs, create one directory by disc in new subfolders: Album/Disc01; Album/Disc02

thanks a lot

Provided you have filled DISCNUMBER only for files where there are several discs and those with just 1 disc do not have DISCNUMBER, you could add the extra part like
%ARTIST% - %YEAR% - %ALBUM%[\CD$num(%discnumber%,2)]
(the square brackets work like an if-condition)
You would have to apply that string to the _FILENAME though as otherwise all files in the current folder get moved to the new location. If you want to split the folders, then you move only the files.

Thank you,

I'm finally thinking of doing something different.

That is, I would like to put all the files in a single directory and name the files "1-01 Track Name, 2-01 Track Name, 3-01 Track Name" when there are several CDs, and therefore several directories.


here is my group for the moment:

"_DIRECTORY": %ARTIST% - %YEAR% - %ALBUM% $ifgreater($strstr(FLACWAV,$upper(%_extension%)),0,$upper((%_extension%)),(%_bitrate% kbps))

Then:

"TRACK": $num(%track%,2)

Then:

"FILENAME": %TRACK% %TITLE%


This is perfect for a simple, standard album, but if it's a compilation or if it has several discs it's more complicated.

my new question:

  • If it's a compilation, how to automatically change the filename to %TRACK% %ARTIST% - %TITLE%, and keep the format %TRACK% %TITLE% if it's not a compilation

  • if there are multiple cd's tagged, how to impose the format %DISCNUMBER%-%TRACK% %ARTIST% - %TITLE% automatically

all automatisms only work if you have some cirteria in the file that indicate what should be done.
As MP3tag does not compare the data of different files, you would need an indicator like COMPILATION=1 or that the field is missing for non-compilations.
The same applies to the discnumber: is it always set even for single disc albums with 1/1 or does it only exist for multi-disc albums?
And: do you really want to apply complicated $if() statements or would it be enough to filter for the specific album types now and apply the required simple string? And how often would such a renaming session happen in the future?
Could it be simpler to create 3 different action groups, one for normal albums, one for compilations and one for multi-disc albums and then apply them case by case?

You're probably right, it's easier to have 3 groups
I really need to sort out my music library, it's gotten out of hand since I've been adding to it every day. I just bought a Node steamer, my hard drives need to be clean to. MP3tag is a great tool for that.

Actually, I fill in each disc with Discogs, all the tags are filled in accurately.
For multiple discs, the tag is DISCNUMBER 01, 02, 03. Otherwise it is blank.
For compilations, the indicator is COMPILATION 1

The most useful thing would actually be to be able to add the disc number in the track name only if it is a multiple disc.
Here's what it looks like, for a non-compilation example:

"_FILENAME": [$num(%discnumber%,2)-] %TRACK% %TITLE%

I'm going to create these 3 groups right now, for now it will be enough.
I may need to automate later, we'll see. IF$ statements don't scare me that much but if it works like that ....

I use this condition in my naming structure, so that only multi-disc albums have the disc number in the filename, and even if a single disc does have a totaldiscs value of 1:
...\%albumartist%\%album%\$ifgreater(%totaldiscs%,1,$left(%discnumber%,1)-,)$num(%track%,2) %title%

This one line takes care of all three of these cases for me. Compilations typically have the AlbumArtist field set to "Various Artists" as well as having the Compilation flag set to 1.

Edit: Of course this does stray from the original request title, as it places all tracks into one folder and not separated by disc. But in my case I found that to be unnecessary and with your subsequent posts think you may be leaning that way as well.