Characters that defeat Windows file search window?

My work involves locating a file within a folder, from a list in Excel. I copy the filename then paste it into the search field at upper right on a Windows 10 box that I’m remoted into. Works fine most of the time, but some filenames invoke “No items match your search”. I backspace over a chunk of the filename, leaving the bit at the end (which contains some code that tends to be unique to the filename) and hit enter again and there it is, and no the filename isn’t something different from what’s in the Excel sheet – it just can’t find it by full filename search.

I thought for awhile it was the hyphen or dash character (the critter otherwise known as the minus sign: - not the em dash or en dash or anything fancy), because the ones it couldn’t find often had such characters, but oodles of filenames that have the “-” in them are found without issue, so I can’t figure any rhyme or reason to it. It’s also not an unusually long filename causing this issue. I just had one of those “No items match your search” for this character string, which is considerably shorter than the one above which didn’t prompt that:

LNE - OOPP - NRF - May 2019 - Part 1_c456_s468

Anyone see any reason that Windows can’t find that bloody file when it’s right there in the bloody folder?

I shorten it to “Part 1_c456_s468” and hit enter.

Search results shows this file:

LNE - OOPP - NRF - May 2019 - Part 1_c456_s468.pdf

WTF?

Many application when copying, will also copy formatting. It is quite possible, that in the file name in the Excel doc, there is actually a special character. Sometimes these special characters will show up as a Space character. So by removing part of the file, you probably removed the special character and windows was able to find it. Here is a test for you. Copy the value out of the excel sheet again, and paste it into Notepad. Then copy from there and do your search. After pasting into notepad, you may see a space that goes missing in the name. Or it might show up as some odd ascii character.

In addition to SoToasty’s suggestion, try enclosing the search string in quote marks.

Good idea! Copied filename from Excel. Pasted into Notepad. Selected and copied from Notepad. Pasted into the search window. No results found. Having done so, ferreted out the file itself once again (by omitting the first chunk of the filename once again). Copied the FILE NAME itself from the actual file. Pasted that into the search window. It says no results found.

This, however, makes it find the file. But leaves me still bewildered about why it can’t find the bloody thing without quote marks around it, when other files are found by THEIR filenames w/o issue.

I used to get rid of formatting in that manner A LOT. But very recently, I’ve noticed a new option on the right-click menu. In addition to plain old “Paste”, I now see “Paste as plain text” fairly often. Give it a try!

Since it works in quotes, my guess would be that it’s parsing something in your search as an advanced search command rather than just keywords to search for.

Or it’s just one of the many bugs in Windows Search. There’s a reason a lot of power users will install some sort of third-party search tool. That said, I don’t search often enough to use one, so I have no recommendations.

This is just a guess, but the search function may have problems with file names that contain spaces. Quoting the name fixes the problem.

Not consistently, it doesn’t. The ones it finds w/o problem have spaces too.

That was my guess, too, but I was hoping someone would be able to say “yeah, see that combo of characters in your example filename? that’s telling windows to find all filenames containing this but omitting that”, or whatever, and then I’d know what patterns to tell people to not use when naming files from now on.

I thought about including that but nothing in the filename looks off to me. Excellent Suggestion.

I wondered if it’s applying Boolean logic to a - preceded by a space, but not by a letter. So it would find “File-Wilma” or “File Wilma” just fine but not “File -Wilma.” I don’t know what it would do with “File - Wilma.”

Yep. Just confirmed that with a test. Three files in a folder called banana.txt banana - copy.txt and banana - copy(2).txt

Searching banana finds all 3
Searching banana - (2) omits the third file
Searching banana - copy only finds the first one (even though there is a space after the minus in the search term)

I like Everything (at least I am satisfied with the search speed, though I have never really stress-tested complicated regular expressions). What results does it give for your test files?

How to search files at windows folder search that have dash and the links cited therein have more information about searching for files whose names contain hyphens.

I didn’t thank you folks properly for this… I had seen files with dashes (aka minus signs) in them that the Windows search feature had no problem with. But that was indeed the culprit, it’s just that it’s complicated, apparently if there’s no space before the dash it’s just treated like any other character in the filename, but space dash space followed by other characters is treated as “but not including the following” and that made those files not appear.

Anyway, knowing that, I can aim for the dash and backspace over it and it finds the file.