Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any way to open a windows explorer window with the contents already filtered as if you'd entered them into the search window in the corner?

So I'd like to type directly into the Start Menu or a WinKey+R run menu as shown below then press Enter:

start menu

Ideally I'd get the following result:

example result window

I've tried looking through command line options for explorer.exe but haven't turned up anything to do exactly what I'm asking.

The aim of my question is to figure out if there is an existing command line or something but I'm willing to write an app or script of some sort if there's nothing out there--so any hints as to the APIs I might look at are welcome.

Windows 7 is the minimum platform I'm worried about getting this to work on.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Next to Organize in your screenshot, you can see the Save search button. That will allow you to save the search using your preferred name to:

C:\Users\<username>\Searches\<searchname>.search-ms

If you run this file from the Run dialog or even the command line, Explorer will open up and the search will auto-execute, displaying the results you want. (The search box will not be populated though with the search terms.)

share|improve this answer
    
Great, thank you! I'd just found this option in another old post a minute before you answered. It looks like I can decipher the .search-ms text file so it's possible to write a program to automatically generate the file and open the new window from the 'Run' box without additional steps/clicks! –  nvuono Nov 4 '12 at 1:46
1  
Yup, should be easy enough to programmatically generate, and you can find detailed info. about the XML format here. –  Karan Nov 4 '12 at 1:52
1  
got something basic going that takes 1 argument... "QuickSearch C:\location*.xyz" and I'll probably throw it in the path somewhere as qs.exe github.com/downloads/nvuono/ExplorerQuickSearch/QuickSearch.exe –  nvuono Nov 4 '12 at 6:20
    
Oh very nice indeed! (github.com/nvuono/ExplorerQuickSearch for those looking for the code) –  Karan Nov 4 '12 at 15:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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