How to search for only folders in Windows 7 instead of folders AND files
Solution 1
From the Windows Search Advanced Query Syntax page, use the following search items:
To restrict by file type Use Example
------------------------ --- -------
Folders folders kind:folders
Folder name foldername foldername:mydocs
Solution 2
In the Search box type:
type:="File Folder" name:[enter the folder name here with no brackets]
Solution 3
I understand that you are asking specifically for windows-search based answers, but here is an alternate method in case it is helpful.
Open up the windows command prompt and navigate to the directory from which you want to start searching and use the following command:
dir *SEARCH_TERM* /ad /s
Windows Search just makes me howl with rage for a few minutes before I give up and just do the same search from the command prompt instead.
Solution 4
On a german version of Windows 7 you'll need the filter below, because type:folder or the like won't work at all:
typ:=Dateiordner
BTW, if you press Win+F, the searchbox will offer at least a tiny bit of assistance below the box and clicking on its blue links will trigger selection widgets.
Solution 5
In cmd.exe
CLI, go to the folder you want to search from, then dir /ad /b /s "search-string"
Please note that it must be cmd.exe
, as I found it is an issue when using PowerShell
with that command
Related videos on Youtube
sshow
By day: Python & Go By night: Brazilian jiu-jitsu By sleep: Light
Updated on September 17, 2022Comments
-
sshow over 1 year
I've had some issues with the new search function in Windows 7. The Search in Windows XP was packed with so many more options. The only option I can access now are Date Modified and Size.
Any pointers to how to get more options in the Windows 7 Search, or links to external programs that can make my life easier?
-
G-Man Says 'Reinstate Monica' over 8 years
-
-
sshow about 14 yearsNow I see, maybe the Windows 7 search is a bit better suited for search than the Windows XP version =)
-
Nicu Zecheru about 14 years@sshow - you should say thanks to snark by up voting the answer. +1 from me
-
CSchulz over 10 yearsVery fast and good solution. :) But I prefer to add /b for single line output. ;)
-
Zombo over 9 years
foldername
is not correct. It searches for files and folders inside of folders of a certain name. -
G-Man Says 'Reinstate Monica' over 8 years
kind:folders
(orkind:folder
) finds folders, but also collection files like*.CAB
and*.ZIP
. To find only true folders, usetype:folder
. -
NotAVeryProfessionalPikachu about 8 yearsthis is the best answer. you can also put , e.g. name:*middle
-
Omar Abdirahman almost 8 years+1 In Windows 10 Pro:
kind:folder myfolder
-
Ivan Castellanos over 7 yearsBTW this works only for the English versions of Windows, for other languages you need to use the translated key word (whatever it may be), yeah, it sucks.
-
Dennis T --Reinstate Monica-- almost 6 years
type:"File Folder"
(without the equals sign) works as well. -
Liggliluff over 5 yearsTo know what "folder" is called in your language, simply go to a folder and check the properties of it, there it should say "Type: Folder" as the first attribute of the first tab in your language. That is the word you should use for your language, and hopefully what is translated as "Type:" is what you should use before the colon.
-
Scott - Слава Україні over 5 years(1) I appreciate the fact that the French version of Microsoft Windows requires certain commands and keywords to be entered in French. But please write the narrative / descriptive part of your answer in English. The user isn’t actually supposed to type “tapez le nom de votre dossier, sans les parenthèses. Tapez un espace après nom”, are they? (2) If you are copying this answer from somewhere, you should say where.
-
Vicky Dev over 2 yearsHow can I find only empty folders ? And/Or folders whose size is less than 100 or 10 KB ?
-
Vicky Dev over 2 yearsHow can I find only empty folders ? And/Or folders whose size is less than 100 or 10 KB ?