# Characters that defeat Windows file search window?

**URL:** <https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182>\
**Category:** Factual Questions\
**Created:** [January 21, 2022, 5:42pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182 "2022-01-21T17:42:28Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [January 21, 2022, 5:42pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/1 "2022-01-21T17:42:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![SoToasty](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sotoasty/32/2803_2.png) [@SoToasty](https://boards.straightdope.com/u/SoToasty)\
**Post date:** [January 21, 2022, 5:50pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/2 "2022-01-21T17:50:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Petek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/petek/32/1590_2.png) [@Petek](https://boards.straightdope.com/u/Petek)\
**Post date:** [January 21, 2022, 5:52pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/3 "2022-01-21T17:52:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [January 21, 2022, 5:54pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/4 "2022-01-21T17:54:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [January 21, 2022, 5:55pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/5 "2022-01-21T17:55:54Z")

</div>

> [@Petek](#):
>
> In addition to SoToasty’s suggestion, try enclosing the search string in quote marks.

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.

---

<div class="post-metadata">

**Author:** ![Keeve](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Keeve](https://boards.straightdope.com/u/Keeve)\
**Post date:** [January 21, 2022, 5:57pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/6 "2022-01-21T17:57:35Z")

</div>

> [@AHunter3](#):
>
> Copied filename from Excel. Pasted into Notepad. Selected and copied from Notepad. Pasted into the search window.

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!

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [January 21, 2022, 6:04pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/7 "2022-01-21T18:04:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Petek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/petek/32/1590_2.png) [@Petek](https://boards.straightdope.com/u/Petek)\
**Post date:** [January 21, 2022, 6:06pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/8 "2022-01-21T18:06:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [January 21, 2022, 6:09pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/9 "2022-01-21T18:09:54Z")

</div>

> [@Petek](#):
>
> 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.

> [@BigT](#):
>
> my guess would be that it’s parsing something in your search as an advanced search command rather than just keywords to search for

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.

---

<div class="post-metadata">

**Author:** ![SoToasty](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sotoasty/32/2803_2.png) [@SoToasty](https://boards.straightdope.com/u/SoToasty)\
**Post date:** [January 21, 2022, 6:15pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/10 "2022-01-21T18:15:02Z")

</div>

> [@Petek](#):
>
> In addition to SoToasty’s suggestion, try enclosing the search string in quote marks.

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

---

<div class="post-metadata">

**Author:** ![Tired\_and\_Cranky](https://avatars.discourse-cdn.com/v4/letter/t/a87d85/32.png) [@Tired\_and\_Cranky](https://boards.straightdope.com/u/Tired_and_Cranky)\
**Post date:** [January 21, 2022, 6:23pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/11 "2022-01-21T18:23:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [January 21, 2022, 7:38pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/12 "2022-01-21T19:38:08Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [January 21, 2022, 9:48pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/13 "2022-01-21T21:48:32Z")

</div>

I like [Everything](https://www.voidtools.com/downloads/) (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?

---

<div class="post-metadata">

**Author:** ![Petek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/petek/32/1590_2.png) [@Petek](https://boards.straightdope.com/u/Petek)\
**Post date:** [January 21, 2022, 11:06pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/14 "2022-01-21T23:06:28Z")

</div>

[How to search files at windows folder search that have dash](https://superuser.com/questions/849577/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.

---

<div class="post-metadata">

**Author:** ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)\
**Post date:** [January 28, 2022, 8:39pm UTC](https://boards.straightdope.com/t/characters-that-defeat-windows-file-search-window/958182/15 "2022-01-28T20:39:00Z")

</div>

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.
