How can I specify that a search using File Explorer should return files only? I've tried kind:=file and type:file and not kind:=folder and other variations, but nothing works. Surely there is an easy way to say "show me everything that's not a folder"!

2 Answers 2


Search on Windows 10, in the Explorer Search bar, is case-sensitive for the word NOT.

The following queries work as expected, returning files only:

filename:*ar* and NOT kind:folder
filename:*ar* and NOT type:folder
filename:*ar* And NOT kind:folder

BTW, on this Windows 10 machine, AND is autocorrected to And, for no apparent reason, but both And and and work as Boolean operators. Go figure.

However, the following queries return the empty set in the Explorer Search bar:

filename:*ar* and not kind:folder
filename:*ar* And not type:folder

However, those queries work just as well as the first batch, in Task Bar Search! Apparently, that Search is not NOT or not case-sensitive. And, AND is not autocorrected to And.

It took a bit of testing to discover these strange, perplexing, idiosyncratic, downright quirky behaviors! A foolish consistency is the hobgoblin of little minds. Thanks, Microsoft, for eliminating in-house QC, making life more interesting for users.


As of Windows Update on 09 Jul 2024, AND is no longer autocorrected to And. However, lower-case not is still ignored.

[Irrelevant note: Telemetry services that had been disabled were turned back on by the update. sigh]

  • This answer is just so good! Accurate, complete above and beyond the call of duty, and suitably snarky as regards the situation our overlords in Redmond put us in. Upvoted and marked as the answer. Thank you! Commented Jul 8 at 3:35
  • Fantastic answer! But, what you're saying is that the explorer search recognises boolean operators AND, And, and and NOT but not Not / not? Not what I'm seeing on Win 10: AND and NOT work, not And, and, Not or not. And not updated to 9 July update yet.
    – pcdev
    Commented Jul 10 at 4:09

To specify a search in File Explorer that returns only files (excluding folders), you can use the following method:

  1. Use the NOT operator: You can specify that you do not want folders by using the NOT keyword.
  2. Use the kind operator: You can combine the kind operator with the NOT operator to filter out folders.

Here's the search query:

kind:NOT folder

This query tells File Explorer to show all items that are not folders, effectively displaying only files.

If you want to refine your search further, you can add additional criteria. For example, if you're looking for all files of a specific type (e.g., documents or images), you can combine the kind operator with specific types:

kind:NOT folder kind:document

Or, for all non-folder items without specifying a type:

kind:NOT folder

This should help you find only the files you are looking for in File Explorer.

  • 1
    Observe the question: not, not NOT was used. That was the issue, and only in Explorer's Search. Commented Jul 8 at 2:30
  • ``` NOT kind:folder ``` This will exclude all folders from the search results, showing only files. If you have any additional criteria you want to include, you can add them to this query. For example: ``` NOT kind:folder *.txt ``` This query will return only text files, excluding any folders from the results. Using NOT kind:folder is the key to filtering out folders from your search. Commented Jul 8 at 2:33
  • Edit your question with the file level syntax to match question criteria more accurately, I think this is what was being told to you. So make that comment an edit instead and incorporate into the answer provided. Commented Jul 8 at 2:45
  • 1
    @ThasleemSaleem, you're missing the point: the OP did use the NOT Boolean operator. His query failed because Explorer Search is case-sensitive for that operator -- not, lower case, is ignored. NOT not. Commented Jul 8 at 13:13
  • 1
    Which is the kind of behavior you expect from a file utility for an operating system where the file system is not case sensitive, sigh... Commented Jul 8 at 15:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .