Tordex Community

Full Version: Command line search question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This question was originally posted by snafu in another spot:

Is there a way to search the contents of a specific folder on the hard drive using commandline search?
I've searched any information about this. The only information I've found is the Windows Search protocol (search-ms).

But I can't get this protocol working Sad Generally the search url looks like:
Code:
search-ms:query=%s&crumb=folder:C:\MyFolder&

But it opens the windows search with the text I typed. But explorer ignore the folder and don't search anything Sad
Windows Vista allows you to install (download) Windows Desktop Search 4 as a replacement indexing service. Perhaps I'm wrong but I think Windows Desktop Search has an API for it, although maybe it's only for filtering additional file types...
Downloaded Windows Desktop Search 4 but is don't want to be installed on my Vista Sad

But found the other thing. If I enable the indexing service it is possible to search in the indexed files using the url:
Code:
search-ms:query=%s&
Thank you mr. Kobets, that search string brought the command line to the next level for me.

However I still believe there could be a room to improve.

Quote:System search APIs can be used to provide fast search capabilities within third-party applications, such as a search box placed directly within the application frame or window.
For developers
<!-- m --><a class="postlink" href="http://www.microsoft.com/windows/products/winfamily/desktopsearch/choose/windowssearch4/developers.mspx">http://www.microsoft.com/windows/produc ... opers.mspx</a><!-- m -->

Perhaps you downloaded an older or incorrect version from before it was supported on Vista? They dropped the "desktop" part from it's name recently.
<!-- m --><a class="postlink" href="http://www.microsoft.com/windows/products/winfamily/desktopsearch/choose/windowssearch4.mspx">http://www.microsoft.com/windows/produc ... arch4.mspx</a><!-- m -->

I'm not into development myself so I'm not very literate on the documentation. I can't tell for sure if this would fit for TLB but I truly hope so as I wish to interact with the OS as little as possible...