# How do you evaluate if there is 2 discs or not I'm under Rename?

**URL:** https://community.mp3tag.de/t/how-do-you-evaluate-if-there-is-2-discs-or-not-im-under-rename/18054
**Category:** Support
**Created:** [June 21, 2016, 11:11pm UTC](https://community.mp3tag.de/t/how-do-you-evaluate-if-there-is-2-discs-or-not-im-under-rename/18054 "2016-06-21T23:11:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DevXen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/b38774/32.png) [@DevXen](https://community.mp3tag.de/u/DevXen)
#### Post date: [June 21, 2016, 11:11pm UTC](https://community.mp3tag.de/t/how-do-you-evaluate-if-there-is-2-discs-or-not-im-under-rename/18054/1 "2016-06-21T23:11:39Z")

</div>

I have an action to rename mp3s. And I am not sure how to evaluate if the %discnumber% tag. Is empty, or has greater than 1.

So I can add: Disc 01, Disc 02, Disc 03, etc. But only if the second value in the tag is above 1. Like: 1/2 or 2/2 or 1/3, disc number/total discs

If that tag is empty I don't want it to add a disc number and if that tag is 1 or 1/1 I don't want it to add a disc number. I'm not sure how I would add that to an action rename script to go with the rest of host I have it renaming/organizing it.

---

<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: [June 22, 2016, 5:02am UTC](https://community.mp3tag.de/t/how-do-you-evaluate-if-there-is-2-discs-or-not-im-under-rename/18054/2 "2016-06-22T05:02:36Z")

</div>

> [@DevXen](#):
>
> ... But only if the second value in the tag is above 1. Like: 1/2 or 2/2 or 1/3, disc number/total discs ...

As the first step you should isolate the total disc number from the compound disc number.  
Action: Guess values  
Source format: %discnumber%  
Guessing pattern: %dummy%/%disctotal%  
Now use the tagfield DISCTOTAL for the other calculations.

DD.20160622.0902.CEST

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 22, 2016, 5:12am UTC](https://community.mp3tag.de/t/how-do-you-evaluate-if-there-is-2-discs-or-not-im-under-rename/18054/3 "2016-06-22T05:12:36Z")

</div>

> [@DevXen](#):
>
> I have an action to rename mp3s. And I am not sure how to evaluate if the %discnumber% tag. Is empty, or has greater than 1.
> 
> So I can add: Disc 01, Disc 02, Disc 03, etc. But only if the second value in the tag is above 1. Like: 1/2 or 2/2 or 1/3, disc number/total discs
> 
> If that tag is empty I don't want it to add a disc number and if that tag is 1 or 1/1 I don't want it to add a disc number. I'm not sure how I would add that to an action rename script to go with the rest of host I have it renaming/organizing it.

I would clear those discnumber fields first that apparently have no decent contents.

The square brackets in a format string serve as "if" operator.  
So %album%[- %discnumber%]  
would lead to  
The Lamb lies down on broadway - 1  
if %discnumber% is 1  
and to  
Abacab  
if discnumber is not filled.

Perhaps this is what you are looking for.

---

<div class="post-metadata">

### Author: ![DevXen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/b38774/32.png) [@DevXen](https://community.mp3tag.de/u/DevXen)
#### Post date: [June 22, 2016, 12:53pm UTC](https://community.mp3tag.de/t/how-do-you-evaluate-if-there-is-2-discs-or-not-im-under-rename/18054/4 "2016-06-22T12:53:59Z")

</div>

> [@ohrenkino](#):
>
> I would clear those discnumber fields first that apparently have no decent contents.
> 
> The square brackets in a format string serve as "if" operator.  
> So %album%[- %discnumber%]  
> would lead to  
> The Lamb lies down on broadway - 1  
> if %discnumber% is 1  
> and to  
> Abacab  
> if discnumber is not filled.
> 
> Perhaps this is what you are looking for.

Thanks to both of you, I actually was able to get it to work with this (In Case anyone else needs to get it working):  
$if($grtr($right(%discnumber%,1),1),Disc 0$num(%discnumber%,1) - ,)

---

<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:26pm UTC](https://community.mp3tag.de/t/how-do-you-evaluate-if-there-is-2-discs-or-not-im-under-rename/18054/5 "2026-02-09T12:26:18Z")

</div>


