What is the limit of to how long a query like 'name:("name1.txt" OR "name2.txt" OR ...)' can be for Windows Explorer search bar? Or, in which Windows documentation can one find that info?

I have small lists of files (30/40 in no) which I need to see from the large folder. One of the list I took to construct a query (with 19 long filenames, total length of query 4154 chars). It worked on that list, but on a larger set it fails, so there is some limit at play here (not sure whether it's the number of files or query length.

(This is a follow up to the comment for this question.) Hope I'm not inadvertently committing a SE crime by turning it into a question!

  • @Moab Isn't that for a browser? Does that apply to Windows Explorer (aka file explorer) as well?
    – spcsLrg
    Oct 17, 2020 at 14:20
  • Evidently it is 255 characters>>>superuser.com/questions/554975/…
    – Moab
    Oct 17, 2020 at 14:30
  • @Moab Well, as I wrote in my question, I've already performed a 4154 char long query... so it appears it is larger than 255 chars, no?
    – spcsLrg
    Oct 17, 2020 at 14:32
  • Maybe 255 is the limit on that specific search, try a search less than 255 on that same set you get an error on.
    – Moab
    Oct 17, 2020 at 14:36

1 Answer 1


I think I have figured out how many files it will accept:

My trials:

  • Windows 7: 35 filenames in the query (total query length was 1798 characters long, and as mentioned in question, I have already done a query with 4154 chars but with larger names and fewer files (so it appears the length does not matter, the number of files does). Though I do have a feeling that the 4145 char long query might've been a mistake, in counting the length properly and it could've been shorter, but anyway, it's the number of filenames that matter anyway apparently
  • Windows 10: Won't even accept a query longer than 518 in my trial with 35 name query pasted in the box (truncates), so make whatever of that, if you will.

You must log in to answer this question.

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