In Windows 7, when I search for a file, how can I specify details like "search for folders only"?

Is the widget in the top right of the window the only way to make a search?

Isn't there anything like in Linux, MacOS, Windows XP, ...?


migrated from stackoverflow.com Dec 4 '10 at 0:56

This question came from our site for professional and enthusiast programmers.

  • 1
    Since you're asking about "the widget in the top right of window," I'm guessing that this isn't a programming question. – Marcelo Cantos Dec 3 '10 at 11:51
  • Well, actually I am developing software on Windows, and I cannot understand why it must be so counterintuitive to do such a basic operation... – Pietro Dec 3 '10 at 12:00

Ok, I found it. In the widget in the top right of a folder window, you have to manually write:

kind:folders folderName

If this is the only way to do it, I would say they are going back from GUIs to text mode interfaces...

This is progress, after all ;-)

I am sorry if this is not a purely development related topic.

  • 5
    Note kind:folder will find true File Folders and also archive files (specifically, WinZip files, but maybe also things like .CAB, RAR files, etc.), whereas type:folder will find only true File Folders. Try searching for Advanced tips for searching in Windows in Windows Help and Support. – Scott Mar 13 '13 at 18:35
  • 2
    +1 I wish I could upvote it several times, but I can't! Thanks! – dasblinkenlight Jun 13 '13 at 16:05
  • 2
    won't work on a german system, where you need something like typ:=Dateiordner – Jörg May 6 '14 at 12:24

WIN + F; -> in the top right you should be able to create a filter.

For explanation, WIN + F is the basic windows search known from XP and so on. As they removed the dog, they left as hanging without a pet :(!

But win + F brings you too your search (without pet), at the top right you should be able too "create filter" by "Kind" "ChangeDate" "Type" "Size" -> Type should do it, but you have too scrool trough the possibilities.

  • 1
    Is that an answer or a question? – Marcelo Cantos Dec 3 '10 at 11:51
  • should be a answer with a further question if it fails :$ – Simon Dec 3 '10 at 12:00
  • 1
    This may be the first "explanation" I've seen that is less clear than the original. – Cody Gray Dec 3 '10 at 12:21
  • I bet it´s because of the dog... – Simon Dec 3 '10 at 12:49
  • +1 Makes sense to me and funny, its a punctuation issue, time for an edit. – Moab Dec 4 '10 at 2:15

use powershell which is part of Windows 7.

dir -recurse | Where-Object { $_.PSIsContainer } | ForEach-Object { $_.FullName }

- recurse means start in this folder and do all subfolders

  • I cannot believe I have to write such a long and convoluted string to make a search! No GUI widget available? – Pietro Dec 3 '10 at 12:04

I use this from within an AutoHokey script and tied it to Win-G key combination:

InputBox, SearchTerm,GT57 Find and Goto To Folder,,,,110
if (SearchTerm <> "")
    run, explorer.exe "search-ms:crumb=type:folder&query="%SearchTerm%

From a Run window, run the following command:

explorer.exe "search-ms:crumb=type:folder&query="YOUR DESIRED FOLDER"
  • If you want to search with "Begins With" form, use the following: explorer.exe "search-ms:crumb=type:folder&query=System.FileName:~<"Folder to Find" the ~< means "Begin With" – GT57 Mar 13 '13 at 19:30

The answer is to use Windows Search Advanced Query Syntax -- a.k.a. filters.

You can narrow your searches using a variety of keywords, or search parameters, which can restrict your query to specific locations, specific file types or properties within those types, or specific "file kinds." File kinds are displayed at the top of the Windows Search Explorer, accessible by pressing the Windows Logo key + F.

To match a specific string literally, without it being interpreted as a keyword, you can use double quotation marks. Words in a search query entered between quotation marks are matched exactly, in the order they were entered.

Click here for the list of search filters available by default per Windows Search v4.

  • Microsoft broke the link. – Noumenon May 28 '14 at 10:56

You can narrow your search in Windows Search to respond with only files and folders from hard drives (i.e. not in Outlook or ZIP files) by appending "store:files" to the search criteria. More infomration can be found here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.