Filter Expressions: What am I doing wrong?

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?


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

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... :slight_smile:

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

Read section "Notes" on this page ...


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".

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 ...


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..