Check Revise My Filter, Please

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.

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

%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 thread?)

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

@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 thread?)

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

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.

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

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+)

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

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

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

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

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.

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.