0

How can you find folders in Windows Explorer whose name STARTS WITH the exact search term, WITHOUT at the same time finding folders that CONTAIN the search term somewhere in the name?

Of course, this is quite easy with third-party software such as Voidtools Everything, however in this case it must be done specifically with Windows Explorer.

This is not a duplicate of How to search for only folders in Windows 7 instead of folders AND files because the present question is not even touched over there AT ALL. Please remove the duplicate mark.

David.P
  • 526
  • 1
    foldername:myText* or just name:myText* might be a good start – Mokubai Jun 07 '22 at 14:51
  • @David.P what have you tried? – Moab Jun 07 '22 at 15:25
  • The good 'ol command prompt helps here too. dir /ad /s "yourSearchTerm*" – Señor CMasMas Jun 07 '22 at 15:25
  • dir /a /s /b | find /i "\starts-with", I have not found ANY File explorer Search "manual" and neither been able to make it work in a sane manner. Many times MISSING obvious hits in the folder I'm launching it in. – Hannu Jun 07 '22 at 18:33
  • @Mokubai - do you by any chance have a pointer to an actual DOCUMENT telling about "foldername:" being a valid entry in the search field? – Hannu Jun 07 '22 at 18:37
  • @Hannu yes. In the accepted answer on the duplicate I found. – Mokubai Jun 07 '22 at 21:17
  • The marked duplicate CONTAINS the answer to your question. Yours is a duplicate. – music2myear Jun 08 '22 at 02:27
  • @Hannu: The most obvious "documentation" for FolderName is the fact that "Folder name" is an available column when EXplorer is displaying a folder in Details mode. However, it's not what you need. If you add the column, you'll see that it displays the parent folder of folders listed in the Details view. – Keith Miller Jun 08 '22 at 06:02
  • As an alternative to wildcard syntax, there are some lesser-known query operators: ~< specifies Starts with and ~> specifies Ends with. To limit results to actual directories and exclude .zip folders, use System.IsFolder:True. So you could use: name:~<SearchText System.IsFolder:True. – Keith Miller Jun 08 '22 at 06:19
  • Also: While type:folder still returns .zip files as well as folders, type:directory limits results to actual file system folders, so it's a viable alternative to System.IsFolder:True – Keith Miller Jun 08 '22 at 06:30
  • Keith, this information totally rocks! Would you be so kind as to write this up as an answer to the original question?

    Is this really not documented anywhere else by Microsoft, especially for regular Windows Explorer users and not just for programmers?

    – David.P Jun 08 '22 at 08:22
  • 1
    @David.P: I posted the answer here. – Keith Miller Jun 11 '22 at 14:29
  • Awesome, thank you Keith – David.P Jun 19 '22 at 20:55

0 Answers0