Help to create a parameter to rename folders

So, I searched a bit in forums and was using the following parameter:

Format Value
Formatstring: %album% '['$if($eql(%_vbr%,'VBR'),VBR %_bitrate%,%_bitrate%),$replace(%_samplerate%,44100,44,48000,48)']'

This parameter rename my folder to the following format:
C:\XXXXXX\Music<Album Name> <[bitrate,edited sample rate]>\

What I want: a parameter that can put the year too and create sub-folders with the numbers of CDs (just if they exist in tags), and also always remove the last 3 digits of the "sample rate", becoming something like this:

C:\XXXXXX\Music<year> - <[bitrate,sample rate without last 3 digits]>\CD 1

C:\XXXXXX\Music\2010 - Extreme Album [320,48]\CD 1
C:\XXXXXX\Music\2010 - Extreme Album [320,48]\CD 2
C:\XXXXXX\Music\2009 - Ultra Album [320,44]
C:\XXXXXX\Music\Super Album [128,22]\

It's possible to do that? I think there's a smarter way to do this than manually...

Thanks in advantage! :laughing: And please, don't mind my poor english.... :unsure:

What if you included the backslash in the formatting action
$if($geql(%discnumber%,1),'\CD %discumber%','')

No, i just get a sub folder called "CD %discnumber%" :frowning:

With _DIRECTORY you can rename the current folder but not create a new one.

Use _FILENAME to create a new folder.

Format Value
Format string: %_folderpath%$if($geql(%discnumber%,1),CD $num(%discnumber%,1),)%_filename%

(It's important that your one disc albums have no discnumber tag)

There are several ways to do this with Mp3tag Scripting Language.

Convert the value of _SAMPLERATE ...

$mid(%_samplerate%,1,$sub($len(%_samplerate%),3)) $left(%_samplerate%,$sub($len(%_samplerate%),3)) $replace(%_samplerate%'$',$right(%_samplerate%'$',4),%DUMMY%) $regexp(%_samplerate%,'^(.+?)...$','$1') $replace(%_samplerate%,'32000','32','44100','44','48000','48','96000','96','192000','192') $div(%_samplerate%,1000)


There are several forum threads about DISCNUMBER and subfolders and so on.
Generating %DISCNUMBER% Tags
Discnumber Action
Settgin disc qty from folder qty
Automatic Discnumber tag from Directory Structure


These have worked for me. Thanks! :laughing:

Just because of curiosity ...
... why did you choose this expression ...

... instead of the simple and effective ...


I've just take one randomly... :unsure: