Average bitrate in folder name

Hi, I'm looking for the solution to make a mass change of my folder names to include also a bitrate information. Something like this:

if VBR \Dark Side of the Moon [VBR 234]\01 - Breathe
else \Dark Side of the Moon [320]\01 - Breathe

The following format string does not work
\%artist%$if("%_vbr%","VBR","%_bitrate%")$num(%track%,2) - %title%

What do I do wrong? Thanks!

Hopefully, this expression should work:

%artist%\%album% '['$if2(%_vbr%,) %_bitrate%']'$num(%track%,2) - %title%

You can also use this one if you really don't want "CBR" in your folder names.

%artist%\%album% '['[$if2($replace(%_vbr%,CBR),) ]%bitrate%']'$num(%track%,2) - %title%

Sorry but I can't figure it out. It returns something like this (for VBR and CBR):

"\ACDC\The Very Best\01 - Hard As Rock.mp3" ->
"\ACDC\The Very Best [ ]\01 - Hard As Rock .mp3"

What version of LAME are you using? Older versions don't show codec profile information. Neither do some other mp3 encoders. Most of my mp3's are LAME 3.97 through 3.98.2 and the codec profile info is in there, and the tagz info that I gave you yesterday worked fine with those files encoded with the newer versions.

Try this one:

\%artist%\%album% '['[$replace(%_vbr%,CBR,)] %_bitrate%']'$num(%track%,2) - %title%

The Formatstring

%TITLE%[ '['$if($eql(%_vbr%,'VBR'),'VBR '%_bitrate%,%_bitrate%)']']

results to e. g.
for CBR: Palomino [128]
for VBR: Palomino [VBR 233]

... or just even better (based on drbeachboy's example from above)

[%TITLE%' ']['['[$replace(%_vbr%' ','CBR ',)]%_bitrate%']']


Hi, thanks! Both last two expressions work, but in case of VBR they create for each file with different bitrate a new folder, so several folders with one file. I thought %_bitrate% should actually show album average bitrate.

Sorry if I miss something. :slight_smile:

Mp3tag offers %_vbr% and %_bitrate% system variables on a per file basis.

So it makes no sense to use these values when renaming folders.


I read that %_bitrate% also returns the average bitrate of a VBR file in this old thread:

A few Features that would be nice.

Is this still true ?

Can you please confirm that the quoted post was wrong?

It returns the variable bitrate found in a VBRI header.

so... is average bitrate possible for VBR albums?

i managed to rename CBR fine. but for now, i just set all VBR albums to [VBR].

would love to add average bitrate, but nothing seems to work.

if you have any hints, please let me know!

thanks :slight_smile:

though this thread is a bit old, I just add one expression based on the ones posted above (thanks a lot to everyone here as I have no idea how to write this sort of thing!! :laughing: )

if like me you don't want to have your folder name modified (cuz you have other info) and just want the bitrate added to it

Artist - Album - year [Japanese Edition] (remastered 20XX)


Artist - Album - year [Japanese Edition] (remastered 20XX) [320]

choose: Format value

field: _directory
format string: %_directory% '['$if($eql(%_vbr%,'VBR'),VBR %_bitrate%,%_bitrate%)']'

it worked for me :book:

Hm, ... it worked for you, but how?

I want to repeat that ...
Average bitrate in folder name


:laughing: well this ...i dont know! as I said I just changed one of the xpression here a wee bit... but it still works well, I've used it for a while now and use it almost everyday.
all the other expression I used from here were always modifying the name of my folder, which as I explained is something i dont want.

why do you think it shouldnt work (if it's not too technical explain)? or what's the problem...I'm not too sure what your link was intended at...

I understand that you got no problems when renaming a folder in the path to the media file with an appended number of CBR or VBR by formatting the pseudo tag-field _DIRECTORY.

Other user reported problems.
Read there ...
Need help with Directory naming action


what's explained in this link of yours is rather different from what I do... I just want the bitrate added and my folder unchanged as I said, ...they want to use tag info to create some sort of a foldername template... whatsoever, I have no problem no matter whether the files are CBR or VBR and that's all that matters to me, so if like me people want to add the bitrate and leave all other things unchanged, this expression is great! :music:

Maybe I have misunderstood your words in post#14 within this thread ...
Average bitrate in folder name

I want to mention that using a dynamic value like VBR in the name of a folder within a folderpath, when writing to the pseudo tag-field _DIRECTORY, this will result in several new folders, one per each VBR value.
Previously it was certainly always the case ... but maybe I am wrong.
Well, you can check it out for yourself.


No, _DIRECTORY renames the current folder, it does not create new folders. So it works fine for this purpose.

Although it renames the folder with the bitrate of the first file, not the average bitrate of the whole folder. That's not possible without some extra steps with the export tool.