# Settgin disc qty from folder qty

**URL:** https://community.mp3tag.de/t/settgin-disc-qty-from-folder-qty/6567
**Category:** Support
**Created:** [April 2, 2008, 11:43pm UTC](https://community.mp3tag.de/t/settgin-disc-qty-from-folder-qty/6567 "2008-04-02T23:43:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [April 2, 2008, 11:43pm UTC](https://community.mp3tag.de/t/settgin-disc-qty-from-folder-qty/6567/1 "2008-04-02T23:43:00Z")

</div>

I have tracks filed \<Disc#\<Track#\>. How my I automatically set %discnumber% to \<Disc#\>/? Thanks.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 3, 2008, 6:15pm UTC](https://community.mp3tag.de/t/settgin-disc-qty-from-folder-qty/6567/2 "2008-04-03T18:15:45Z")

</div>

I don't know if I understand what you've described - a filename - a folderpath?  
Hmm ...

Having such a foldertree:

```
ABC
--CD1
----01.Track.mp3 ==> DISCNUMBER: 1/2
----02.Track.mp3 ==> DISCNUMBER: 1/2
--CD2
----01.Track.mp3 ==> DISCNUMBER: 2/2
----02.Track.mp3 ==> DISCNUMBER: 2/2
DEF
--01.Track.mp3 ==> DISCNUMBER: 1/1
--02.Track.mp3 ==> DISCNUMBER: 1/1

```

With the following actionsgroup you can create proper DISCNUMBER values.

Begin Actionsgroup **Set DISCNUMBER n.1.2**  
Action #1  
_Actiontype 5:_ **Format tag field**  
_Field:_ **DISCNUMBER**  
_Formatstring:_ **$if($eql($regexp(%\_directory%,^._÷_(CD)÷\*\d+._$,$1,0),CD),$regexp(%\_directory%,^.÷CD÷_0\*(\d+).\*$,$1,0)/2,1/1)**  
Note: Replace one special character ÷ with one space character.  
End Actionsgroup **Set DISCNUMBER n.1.2** (1 Action)

Example for3 CD's:

Begin Actionsgroup **Set DISCNUMBER n.3**  
Action #1  
_Actiontype 5:_ **Format tag field**  
_Field:_ **DISCNUMBER**  
_Formatstring:_ **$regexp(%\_directory%,^._÷_CD÷_0_(\d+).\*$,$1)/3**  
Note: Replace one special character ÷ with one space character.  
End Actionsgroup **Set DISCNUMBER n.3** (1 Action)

DD.20080403.2215.CEST

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [April 4, 2008, 8:53am UTC](https://community.mp3tag.de/t/settgin-disc-qty-from-folder-qty/6567/3 "2008-04-04T08:53:26Z")

</div>

> I don't know if I understand what you've described - a filename - a folderpath?  
> Filepath.

> Having such a foldertree:

That's it precisely.

> With the following actionsgroup you can create proper DISCNUMBER values.

Thanks, but I was hoping for something that would automatically set the discqty e.g. for albums having (so far) 1,2,3,4 and 10 discs.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [July 17, 2008, 9:44am UTC](https://community.mp3tag.de/t/settgin-disc-qty-from-folder-qty/6567/4 "2008-07-17T09:44:00Z")

</div>

Clarification:

I have multi-CD albums filed myalbum\1\track1.wma, myalbum\2\track1.wma etc. How can I automatically set DISCNUMBER to /? Thanks.

---

<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:20pm UTC](https://community.mp3tag.de/t/settgin-disc-qty-from-folder-qty/6567/5 "2026-02-09T12:20:52Z")

</div>


