21

Is there a way to search in Windows Explorer for just folders?

I know folders get sorted to the top, but I'm always looking for that extra option.

1
  • D:\>dir /s /d *directory-name* Aug 29, 2022 at 2:45

8 Answers 8

14

In the Windows Explorer search pane make sure that More Advanced Options is expanded (not all versions of Windows require you to explicitly expand this).

Find the drop down marked Type Of File (it's normally the first advanced option), and choose Folder.

Your search results will now only include folders.

Edit: If you've got the dog "helping" you search, then you're in the basic search dialog and the above instructions might be wrong. The Type of File option likely exists here (you'll just have to look for it), but you're probably best of switching to "classic" search anyway.

5
  • I guess that's for XP? I'm on Vista here. Bog I hate Vista.
    – MathewC
    Jun 16, 2009 at 16:41
  • I gave you the check since everyone else wanted to use command line. I couldn't check your answer since I don't have XP. Thanks for actually reading the question though.
    – MathewC
    Jun 30, 2009 at 13:59
  • Unfortunately every version of Windows after 2000 seems to find a new way to gimp the search function in Explorer. It started out with find text in file not really working on all file types and has rapidly gone down hill from there. It would be nice if Windows 7 offered a true Windows 2000 search, even if it had to be manually turned on in an advanced menu or even a registry setting. Your best bet would probably be to Google a tutorial on restoring "classic" search - I believe I've seen some methods for transplanting it from the older explorer.exe, but have never tried it myself.
    – David
    Jul 1, 2009 at 1:29
  • On Win10, just click inside of the search pane, and the Search ribbon will get activated. You can then click the "Kind" dropdown and select "Folder"
    – Zimano
    Mar 6, 2020 at 17:17
  • Win10 answer didn't work for me, I selected "PowerShell kind:folder", and it's still showing me files with "Powershell" in the file name, as opposed to only showing me directories containing the string "PowerShell" Jun 8, 2022 at 19:39
14

Some of the items on this page work in Windows 7, even though they are marked as "deprecated". So to search for folders X:

X kind:folder 

You'll notice that when you type kind: into the Windows 7 search box in windws explorer (the one at the right hand side, not the "address bar") you will see a list of the various "kinds"

And say you wanted to search for folders which started with a "." (dotfiles / dotfolders) (like those pesky .svn folders):

kind:folder filename:.svn
3
  • This worked in Windows 10 in Dec. 2019 Dec 19, 2019 at 21:47
  • kind:=folder works as well, but I have no idea why the syntax is different.
    – Zimano
    Mar 6, 2020 at 17:19
  • Still working in Win10 in 2023. Apr 7, 2023 at 20:35
7

In Windows 7 (might be the same in vista), add the following to the search:

type:"file folder"

eg: searchterm type:"file folder"

2
  • 1
    It really irritates me that Windows doesn't have a GUI to do this. Don't get me wrong. I love command line, on linux.
    – MathewC
    Apr 27, 2011 at 11:05
  • @MatthewC Win10 has it! But that's 9 years later :P
    – Zimano
    Mar 6, 2020 at 17:17
2

To expand on Eppz's suggestion, to search for a folder called "tem*" (I've included a wildcard just as an example) somewhere on the C: partition use:

dir /s /d c:\\tem*
0

If you use the command prompt you can always do

dir /d
0
0

At command prompt just "cd" to your path and then use the command bellow. Beware, this search is case sensitive.

dir /d | find "name"

0

So this works for me on Windows 2012 R2 in the search bar to the right of the address bar in Explorer...

Folder name kind:=folder

-1

in file explorer in the top right search box do the following to find node_modules

kind:=folder node_modules
1
  • Zabba already gave this answer a while ago. Dec 26, 2023 at 23:45

You must log in to answer this question.

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