Titles and filenames not matching

Hi all, I am using the following filter to show files where the title field isn't part of the filename, which does work well:

"$ifgreater($strstr(%_filename%,%title%),0,yes,no)" IS no

However, this shows files where characters which aren't allowed by Windows are in the title and (rightly) are not part of the filename. For example, a track has a title "What Ever Happened?" but the filename ends with "What Ever Happened.mp3" as you can't have a ? as part of a filename in Windows.

How can I tweak the above filter to exclude titles containing characters which aren't allowed as part of the filename please? Looking at my library, the following characters as the main culprits: ? : / "

Filtering out those four characters from the filter should, I think, show the files which really do have mismatching titles and names, but I cannot work out how to do this!

Perhaps something like this works:
"$ifgreater($strstr(%_filename%,$validate(%title%)),0,yes,no)" IS no
"$ifgreater($strstr(%_filename%,$replace(%title%,?,,/,,:,))),0,yes,no)" IS no

Thank you for your reply - they don't seem to work though, sorry!

I forgot a comma:
"$ifgreater($strstr(%_filename%,$validate(%title%,)),0,yes,no)" IS no

1 Like

That works, thank you so much! Not many mismatches now which is good :grinning:

Thank you for your help

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