# Check Revise My Filter, Please

**URL:** https://community.mp3tag.de/t/check-revise-my-filter-please/70397
**Category:** Support
**Created:** [December 22, 2025, 2:26pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397 "2025-12-22T14:26:03Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)
#### Post date: [December 22, 2025, 2:26pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/1 "2025-12-22T14:26:03Z")

</div>

Please revise my filter:

discnumber IS 1 NOT \_filename HAS -

The latter part of my filter falls far short anyway, because the filenames may contain more than just one dash. I am unable to fix this. The result should provide a list of all the files in which the %discnumber% is "1" — but _not_ those where their %\_filename% contains a dash "-" anywhere in a numerical string, for e.g. 99-03, 1-02 10-15, etc.

Thank you.

---

<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: [December 22, 2025, 2:43pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/2 "2025-12-22T14:43:20Z")

</div>

Try  
`%discnumber% IS 1 AND NOT %_filename% HAS -`

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [December 22, 2025, 2:51pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/3 "2025-12-22T14:51:32Z")

</div>

`%discnumber% IS 1 AND NOT %_filename% MATCHES (\d+\-\d+)`

It this one does not match for your filenames, please provide real existing file names from your collection.

(I assume this is a follow-up question to the [Assistance Needed to Rename Files More Efficiently](https://community.mp3tag.de/t/assistance-needed-to-rename-files-more-efficiently/70354) thread?)

---

<div class="post-metadata">

### Author: ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)
#### Post date: [December 22, 2025, 2:57pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/4 "2025-12-22T14:57:04Z")

</div>

> [@ohrenkino](#):
>
> %discnumber% IS 1 AND NOT %\_filename% HAS -

I have tried that as well, but it does not achieve the result I want since there are more than one dash in the filename, and I need only those filenames that contain a dash in any numerical combination as shown. Sorry if I am not expressing it well enough. Example:

**1-01**. Starboard - Just The Way It Is.mp3  
**15-24**. Starboard - Only This.mp3

(The dash in the **1-01** and **15-24** is the one needed for the filter. But, its position within the numerical number is not a constant.)

---

<div class="post-metadata">

### Author: ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)
#### Post date: [December 22, 2025, 3:06pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/5 "2025-12-22T15:06:19Z")

</div>

@LyricsLover

> `%discnumber% IS 1 AND NOT %_filename% MATCHES (\d+\-\d+)`

> It this one does not match for your filenames, please provide real existing file names from your collection.

It matches, thank you.

> (I assume this is a follow-up question to the [Assistance Needed to Rename Files More Efficiently](https://community.mp3tag.de/t/assistance-needed-to-rename-files-more-efficiently/70354) thread?)

I am now knee-deep into it, so I am constantly trying to improve efficiency.

---

<div class="post-metadata">

### Author: ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)
#### Post date: [December 22, 2025, 3:12pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/6 "2025-12-22T15:12:27Z")

</div>

> [@ohrenkino](#):
>
> %discnumber% IS 1 AND NOT %\_filename% HAS -

Sorry, I have made a mistake. Your given syntax works fine. I am not sure how it does, and will try it out some more ahead to see if it takes care of all possible dash-variables.

Thank you.

---

<div class="post-metadata">

### Author: ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)
#### Post date: [December 25, 2025, 8:52am UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/7 "2025-12-25T08:52:59Z")

</div>

Hello again, Everyone!

Once again, I am stuck for a filter-syntax, and needing your expertise in the field. I think this belongs to this particular topic, but if you disagree I shall create a new post for it. This too, is a follow-up question to this thread:

[Assistance Needed to Rename Files More Efficiently](https://community.mp3tag.de/t/assistance-needed-to-rename-files-more-efficiently/70354)

My current combined filter, thanks to you previous input, looks like this:

`%discnumber% IS 1 AND NOT %_filename% MATCHES (\d+\-\d+) OR %albumartist% IS various artists OR %_filename% HAS (HTOA) OR %album% IS Unknown`

My objective now, is to add a filter with which to identify those albums that ought to have "Various Artists" in the %albumartist% field, but do not. These occur rarely, and are therefore easily missed. Without elaborating further, I can point that the only constant by which I can identify these albums is that they have the %artist% name in the filename, already.

Thank you.

PS. Would this, perhaps, achieve the goal? `%_filename% MATCHES (\d+\%artist%\d+)`

---

<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: [December 25, 2025, 9:02am UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/8 "2025-12-25T09:02:37Z")

</div>

> [@ragtag](#):
>
> Would this, perhaps, achieve the goal? `%_filename% MATCHES (\d+\%artist%\d+)`

AFAIK you cannot have a field variable on the right of a filter keyword.

Please consider to use the AND operator instead of the OR operator.

To detect files with the ARTIST in the \_FILENAME, try  
`"$ifgreater($strstr(%_filename%,%artist%),0,yes,no)" IS yes`

---

<div class="post-metadata">

### Author: ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)
#### Post date: [December 25, 2025, 12:04pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/9 "2025-12-25T12:04:16Z")

</div>

> [@ohrenkino](#):
>
> Please consider to use the AND operator instead of the OR operator.
> 
> To detect files with the ARTIST in the \_FILENAME, try  
> `"$ifgreater($strstr(%_filename%,%artist%),0,yes,no)" IS yes`

Thank you very much, @ohrenkino. I am looking forward to applying it.

---

<div class="post-metadata">

### Author: ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)
#### Post date: [December 25, 2025, 1:24pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/10 "2025-12-25T13:24:09Z")

</div>

> [@ohrenkino](#):
>
> To detect files with the ARTIST in the \_FILENAME, try  
> `"$ifgreater($strstr(%_filename%,%artist%),0,yes,no)" IS yes`

@ohrenkino

My reasoning was inadequate. Could the filter possibly be modified to apply only to those albums for which both the following statements are true?

1. **Do** have the %artist% in the %\_filename% field.
2. **Do not** have "Various Artists" in the %albumartist% field.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [December 25, 2025, 1:40pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/11 "2025-12-25T13:40:21Z")

</div>

> [@ragtag](#):
>
> - **Do** have the %artist% in the %\_filename% field.
> - **Do not** have "Various Artists" in the %albumartist% field.

The Logical Operator functions AND, OR, NOT add greater flexibility to the filter. These are discussed in the documents for filters.

> **[Filter and Search – Mp3tag Documentation](https://docs.mp3tag.de/filter/)**
>
> Documentation on Filter and Search and keywords to form complex filter expressions. Mp3tag is the universal Tag Editor.

Usually it is the AND function to reduce the number of filter hits by being more specific. The OR function widens the net. NOT is used to invert the result.

@ohrenkino already provided the filter for the first statement. This can filter for the second.  
`NOT %albumartist% IS "Various Artists"`

Combine these two filters with AND to have both applied to your desired results.

---

<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: [December 25, 2025, 2:30pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/12 "2025-12-25T14:30:20Z")

</div>

> [@ohrenkino](#):
>
> "$ifgreater($strstr(%\_filename%,%artist%),0,yes,no)" IS yes

The whole string would look like this:  
`"$ifgreater($strstr(%_filename%,%artist%),0,yes,no)" IS yes AND NOT %albumartist% IS "Various Artists"`

---

<div class="post-metadata">

### Author: ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)
#### Post date: [December 26, 2025, 11:59am UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/13 "2025-12-26T11:59:57Z")

</div>

> [@ohrenkino](#):
>
> The whole string would look like this:  
> `"$ifgreater($strstr(%_filename%,%artist%),0,yes,no)" IS yes AND NOT %albumartist% IS "Various Artists"`

Thank you, @ohrenkino. Also thank you, @LyricsLover and everyone else for smoothing out a tough job, which is now proceeding at a nice pace.

---

<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: [January 25, 2026, 12:00pm UTC](https://community.mp3tag.de/t/check-revise-my-filter-please/70397/14 "2026-01-25T12:00:33Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
