# Filter Expressions: What am I doing wrong?

**URL:** https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029
**Category:** Support
**Created:** [October 23, 2012, 8:03pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029 "2012-10-23T20:03:34Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![deckard](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@deckard](https://community.mp3tag.de/u/deckard)
#### Post date: [October 23, 2012, 8:03pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/1 "2012-10-23T20:03:34Z")

</div>

I have read through the help and the pinned forum topics on Filter Expressions.

Typically, I just do album HAS or title HAS and everything works as expected.

Today, I wanted to look for something in the file name.

I tried filename HAS, %\_filename% HAS, %filename% HAS, etc. but no matter what, I cannot get this to work at all.

My apologies if I am missing something stupid, I just don't see what it is.

Also, how would I look for the string "Pt." (no quotes, but with the period)?  
I tried double quotes and single quotes around the period but I'm not having any luck.  
I'm getting words that end with pt (no period) as well as titles with Pt. in them.

Can someone point me in the right direction?

Thanks!

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [October 23, 2012, 10:17pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/2 "2012-10-23T22:17:36Z")

</div>

> [@deckard](#):
>
> I tried filename HAS, %\_filename% HAS, %filename% HAS, etc. but no matter what, I
> 
> Thanks!

Always get into the habit of wrapping the or in double quotes:  
"%\_filename%" HAS "pt."

---

<div class="post-metadata">

### Author: ![deckard](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@deckard](https://community.mp3tag.de/u/deckard)
#### Post date: [October 23, 2012, 10:21pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/3 "2012-10-23T22:21:59Z")

</div>

> [@deckard](#):
>
> how would I look for the string "Pt." (no quotes, but with the period)?  
> I tried double quotes and single quotes around the period but I'm not having any luck.  
> I'm getting words that end with pt (no period) as well as titles with Pt. in them.

OK that was just silly - I was just putting in Pt. by itself and getting file names that ended with pt.mp3  
Using "title HAS Pt." works fine.

Never mind about that one... 🙂

---

<div class="post-metadata">

### Author: ![deckard](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@deckard](https://community.mp3tag.de/u/deckard)
#### Post date: [October 23, 2012, 10:24pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/4 "2012-10-23T22:24:40Z")

</div>

> [@stevehero](#):
>
> Always get into the habit of wrapping the or in double quotes:  
> "%\_filename%" HAS "pt."

Gotcha. That did the trick. Thanks for the tip!

---

<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: [October 24, 2012, 4:04am UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/5 "2012-10-24T04:04:50Z")

</div>

> [@deckard](#):
>
> ... I have read through the help and the pinned forum topics on Filter Expressions. ... My apologies if I am missing something stupid, I just don't see what it is. ... Can someone point me in the right direction? Thanks!

Read section "Notes" on this page ...  
[https://docs.mp3tag.de/filter](https://docs.mp3tag.de/filter)

DD.20121024.0802.CEST

---

<div class="post-metadata">

### Author: ![deckard](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@deckard](https://community.mp3tag.de/u/deckard)
#### Post date: [October 25, 2012, 12:11pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/6 "2012-10-25T12:11:37Z")

</div>

> [@DetlevD](#):
>
> Read section "Notes" on this page ...  
> [https://docs.mp3tag.de/filter](https://docs.mp3tag.de/filter)
> 
> DD.20121024.0802.CEST

Regarding fields, why is "filename" not treated the same way as "artist" or "title", etc.?  
Is it because the file name is not actually embedded anywhere in the file like tags?  
Definitely notice the lag mentioned in the notes when filtering by "%\_filename" comapred to "artist".

---

<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: [October 25, 2012, 3:11pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/7 "2012-10-25T15:11:09Z")

</div>

FILENAME is not equal to \_FILENAME.  
FILENAME will be treated as well as ARTIST or TITLE.  
In this case, FILENAME is a user defined tag-field.

\_FILENAME is a pseudo tag-field to give the user a handle for the file's name.  
The content of \_FILENAME is **%\_filename%**.

It would help to learn by the examples from there ...  
[https://docs.mp3tag.de/filter](https://docs.mp3tag.de/filter)

DD.20121025.1909.CEST

---

<div class="post-metadata">

### Author: ![deckard](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@deckard](https://community.mp3tag.de/u/deckard)
#### Post date: [October 25, 2012, 6:37pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/8 "2012-10-25T18:37:44Z")

</div>

> [@DetlevD](#):
>
> FILENAME is not equal to \_FILENAME.  
> FILENAME will be treated as well as ARTIST or TITLE.
> 
> \_FILENAME is a pseudo tag-field to give the user a handle for the file's name.  
> The content of \_FILENAME is %\_filename%.
> 
> It would help to learn by the examples from there ...  
> [https://docs.mp3tag.de/filter](https://docs.mp3tag.de/filter)
> 
> DD.20121025.1909.CEST

Thank you for that explanation - I'm still learning and it wasn't clear in the help why "\_%filename%" was not the same as "filename", so I couldn't figure out why filtering with "filename" HAS didn't work the same as "artist" HAS or "album" HAS, etc..

---

<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:24pm UTC](https://community.mp3tag.de/t/filter-expressions-what-am-i-doing-wrong/14029/9 "2026-02-09T12:24:08Z")

</div>


