# \[SOLVED\] Filter for Filenames that are different from Title

**URL:** <https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961>\
**Category:** Support\
**Created:** [July 21, 2019, 7:22pm UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961 "2019-07-21T19:22:25Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@Jim](https://community.mp3tag.de/u/Jim)\
**Post date:** [July 21, 2019, 7:22pm UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/1 "2019-07-21T19:22:25Z")

</div>

I am trying to filter music to find songs where the TITLE is different from the FILENAME.

The FILENAME is in the format: 01 This Is The Title (variable capitalized)  
The TITLE is in the format: This is the Title (Mixed Case)

Can anyone show me a (case insensitive) filter that will compare the FILENAME (with the track numbers removed) to the existing TITLE so that I can correct naming errors?

Thanks in advance for responding to my first post.

---

<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:** [July 21, 2019, 7:30pm UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/2 "2019-07-21T19:30:53Z")

</div>

> [@Jim](#):
>
> with the track numbers removed)

It would probably be easier to compare with the track number:  
`"$if($eql(%_filename%,$num(%track%,2) %title%),1,0)" IS 0`  
and if that does not work  
`"$if($eql($lower(%_filename%),$lower($num(%track%,2) %title%)),1,0)" IS 0`

---

<div class="post-metadata">

**Author:** ![Jim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@Jim](https://community.mp3tag.de/u/Jim)\
**Post date:** [July 21, 2019, 7:56pm UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/3 "2019-07-21T19:56:43Z")

</div>

Thanks, but that returns the files where the truncated FILENAMES are the SAME as the TITLE. How do I filter to show where the truncated FILENAMES are the DIFFERENT from the TITLE?

Thanks again

---

<div class="post-metadata">

**Author:** ![Jim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@Jim](https://community.mp3tag.de/u/Jim)\
**Post date:** [July 21, 2019, 8:29pm UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/4 "2019-07-21T20:29:45Z")

</div>

These (Highlighted with RED arrow) are the files that I would like the filter to show.

 ![image](https://community.mp3tag.de/uploads/default/original/2X/d/d5aa5d7e7475c5e80196c921e5579b4b27842f74.jpeg)

---

<div class="post-metadata">

**Author:** ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)\
**Post date:** [July 21, 2019, 9:08pm UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/5 "2019-07-21T21:08:41Z")

</div>

Try this:  
`"$if($eql(%title%,$cutLeft(%_filename%,3)),yes,no)" IS no`

---

<div class="post-metadata">

**Author:** ![Jim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@Jim](https://community.mp3tag.de/u/Jim)\
**Post date:** [July 22, 2019, 12:01am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/6 "2019-07-22T00:01:48Z")

</div>

That's it - Thanks for all your help.

---

<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:** [July 22, 2019, 5:36am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/7 "2019-07-22T05:36:33Z")

</div>

> [@Jim](#):
>
> Thanks, but that returns the files where the truncated FILENAMES are the SAME as the TITLE.

No.  
What have you got in the field TRACK? If that is empty then naturally, the title will never be like the filename.  
So why don't you fill the field TRACK first before you throw away the existing information?

---

<div class="post-metadata">

**Author:** ![LaurenBacall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/35a633/32.png) [@LaurenBacall](https://community.mp3tag.de/u/LaurenBacall)\
**Post date:** [July 22, 2019, 9:32am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/8 "2019-07-22T09:32:37Z")

</div>

One thing that may occur with a simple filename to title comparison is when illegal filename characters are stripped, making otherwise identical comparisons different.

Such as in the screenshot above _Can I Put You On?_ has a filename of `Can I Put You On.mp3`, minus the question mark character, since Windows doesn't support that character in filenames.

Perhaps Mp3Tag auto accounts for that, not sure. If you knew that all such characters were replaced with nothing you could probably add the validate function into the mix to strip the illegal characters from the comparison - `$validate(%title%,)`, IIRC.

---

<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:** [July 22, 2019, 9:44am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/9 "2019-07-22T09:44:09Z")

</div>

> [@LaurenBacall](#):
>
> Perhaps Mp3Tag auto accounts for that, not sure. If you knew that all such characters were replaced with nothing you could probably add the validate function into the mix to strip the illegal characters

The illegal characters are:

```
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

```

`+` all characters whose integer representations are in the range from 1 through 31.

But there are much more reserved names for file names like:  
`CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9`

And don't forget:  
Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not.

Source and complete list: [Naming Files, Paths, and Namespaces - Win32 apps | Microsoft Learn](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx)

---

<div class="post-metadata">

**Author:** ![LaurenBacall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/35a633/32.png) [@LaurenBacall](https://community.mp3tag.de/u/LaurenBacall)\
**Post date:** [July 22, 2019, 10:01am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/10 "2019-07-22T10:01:56Z")

</div>

> [@LyricsLover](#):
>
> And don't forget:  
> Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not.

Seem to remember this advice for directories before although for filenames I have plenty of files ending in periods that show normally in File Explorer and are openable in programs (including the command prompt). Perhaps the advice was to ensure cross-compatibility with FAT filesystems?

Edit: probably means following the extension rather than before it, which would make sense.

---

<div class="post-metadata">

**Author:** ![Jim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@Jim](https://community.mp3tag.de/u/Jim)\
**Post date:** [July 23, 2019, 12:43am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/11 "2019-07-23T00:43:38Z")

</div>

Why does an empty TRACK field affect the comparison of FILENAME to TITLE? Neither is dependent on the TRACK field since the filename is created external to MP3Tag.

---

<div class="post-metadata">

**Author:** ![Jim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@Jim](https://community.mp3tag.de/u/Jim)\
**Post date:** [July 23, 2019, 12:46am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/12 "2019-07-23T00:46:37Z")

</div>

Understand that. Notice that the filenames DO NOT have invalid characters that appear in the TITLE. I just wanted to make sure that the TITLE was correct for the FILENAME. Thanks.

---

<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:** [July 23, 2019, 4:55am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/13 "2019-07-23T04:55:06Z")

</div>

> [@Jim](#):
>
> Why does an empty TRACK field affect the comparison of FILENAME to TITLE?

The leading number looked suspiciously like a track number.  
So I suggested to use TRACK and TITLE to generate a string that might have looked like the filename.

> [@ohrenkino](#):
>
> `"$if($eql(%_filename%,$num(%track%,2) %title%),1,0)" IS 0`  
> and if that does not work  
> `"$if($eql($lower(%_filename%),$lower($num(%track%,2) %title%)),1,0)" IS 0`

---

<div class="post-metadata">

**Author:** ![LaurenBacall](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/35a633/32.png) [@LaurenBacall](https://community.mp3tag.de/u/LaurenBacall)\
**Post date:** [July 23, 2019, 7:33am UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/14 "2019-07-23T07:33:43Z")

</div>

> [@Jim](#):
>
> Understand that. Notice that the filenames DO NOT have invalid characters that appear in the TITLE. I just wanted to make sure that the TITLE was correct for the FILENAME. Thanks.

The thing is, if the goal from the OP is to find songs where the Title is different from the Filename, and the Title happens to have a character such as `?` that isn't present in the Filename (due to it being an illegal character not possible to have in the filename and being stripped) then such ordinarily matching results in one's mind would nevertheless be lumped into the non-matching results since they don't literally match.

Example to demonstrate (click to zoom), comparing the exact same Title and Filename in the first two screenshots but first one including the $validate() function to strip illegal characters from the comparison filter, while the latter two don't. We can see that both the second and third results would be both considered 'non-matching' despite the second screenshot being a result you wouldn't want being marked as 'non-matching' (at least based on the red arrows in the screenshot you posted above).

 ![Example](https://community.mp3tag.de/uploads/default/original/2X/0/0793e251a72c042cb4924972b2eefa1dac020f39.png)

---

<div class="post-metadata">

**Author:** ![Jim](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ac91a4/32.png) [@Jim](https://community.mp3tag.de/u/Jim)\
**Post date:** [July 25, 2019, 6:00pm UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/15 "2019-07-25T18:00:04Z")

</div>

Again thank you for the expansive (and very correct) explanation. I did not want to overburden the community with an overly intricate request that wouldn't get answered so I posted for a filter that would show MOST of the dissimilar files. The postings filtered the files down to about 50 (from over 38,000) and I examined them manually.

Again thanks, you really know your stuff.

---

<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:28pm UTC](https://community.mp3tag.de/t/solved-filter-for-filenames-that-are-different-from-title/45961/16 "2026-02-09T12:28:10Z")

</div>


