# Directory name based on average bitrate

**URL:** https://community.mp3tag.de/t/directory-name-based-on-average-bitrate/7461
**Category:** Support
**Created:** [November 12, 2008, 2:57pm UTC](https://community.mp3tag.de/t/directory-name-based-on-average-bitrate/7461 "2008-11-12T14:57:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![leadfoot](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c4cdca/32.png) [@leadfoot](https://community.mp3tag.de/u/leadfoot)
#### Post date: [November 12, 2008, 2:57pm UTC](https://community.mp3tag.de/t/directory-name-based-on-average-bitrate/7461/1 "2008-11-12T14:57:00Z")

</div>

I've done a search and found the code for calculating an average bitrate:

```
$loop(%_filename_ext%)$puts(Vbitrate,$add($get(Vbitrate),%_bitrate%))
$puts(cnt1,$add($get(cnt1),1))$loopend()$div($get(Vbitrate),$get(cnt1))

```

What I haven't found (or been able to figure out) is how to use this to rename the directory based on this output. What I would like is a path like \music\artist\album-[avg bitrate]. What I've gotten so far on my first attempt is a separate directory for each song with that song's bitrate in the directory name. Not quite what I was hoping for. Any suggestions (if this is possible?)

Thanks!

---

<div class="post-metadata">

### Author: ![leadfoot](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c4cdca/32.png) [@leadfoot](https://community.mp3tag.de/u/leadfoot)
#### Post date: [December 12, 2008, 6:14pm UTC](https://community.mp3tag.de/t/directory-name-based-on-average-bitrate/7461/2 "2008-12-12T18:14:01Z")

</div>

Hmmm. No One? ![:huh:](https://community.mp3tag.de/uploads/default/original/1X/f15ee73c0fd9ec3b0db7481f0558638f8ee224ce.gif ":huh:")

I found a semi-automated way that is almost as good in that using the html\_dano\_01\_ex\_mp3tag Export Configuration and telling it "One file per directory" produces the info that is much faster than using Mr. Questionman was.

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [December 12, 2008, 9:35pm UTC](https://community.mp3tag.de/t/directory-name-based-on-average-bitrate/7461/3 "2008-12-12T21:35:02Z")

</div>

Yes you must use the export function to generate this information.  
You can write a text file with the export and import the info with "Convert \> text file - tag" to a tag field, then rename your directory based on the new tag field.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:21pm UTC](https://community.mp3tag.de/t/directory-name-based-on-average-bitrate/7461/4 "2026-02-09T12:21:12Z")

</div>


