Exclude directories from Windows Search by wildcard
--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Civilization
--
Chapters
00:00 Exclude Directories From Windows Search By Wildcard
00:42 Accepted Answer Score 24
02:11 Thank you
--
Full question
https://superuser.com/questions/235799/e...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows7 #windowssearch #wildcards
#avk47
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Civilization
--
Chapters
00:00 Exclude Directories From Windows Search By Wildcard
00:42 Accepted Answer Score 24
02:11 Thank you
--
Full question
https://superuser.com/questions/235799/e...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows7 #windowssearch #wildcards
#avk47
ACCEPTED ANSWER
Score 24
I looked in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\DefaultRules key and found something interesting.
DefaultRules\1 contains:
Default REG_DWORD 0x00000001
Include REG_DWORD 0x00000000
Policy REG_DWORD 0x00000000
Suppress REG_DWORD 0x00000000
URL REG_SZ file:///C:\Users\*\AppData\Local\Temp\*
Look at that URL key - two wildcards!
So since Windows Search natively supports wildcards, all we have to do is tweak an existing exception.
Adding wildcard exceptions to Windows Search
- Add template exception.
Add an exception for a suitable directory by going toIndexing Options→Modifyand deselecting one directory (in my case,C:\Users\MyName\dev\trunk\bin). - Stop the Windows Search service.
Go toServices, selectWindows Search, right-click on it, and selectStop. - Find the existing exception.
Open Registry Editor and navigate toHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\WorkingSetRules.
Look through each numbered subkey to find yours. Tweak the exception.
In my case, I have multiple branches checked out, so I will have directories fortrunkand for each versioned branch (such as 3.2, 4.0, etc). So I changed theURLkey fromfile:///C:\Users\MyName\dev\ProjectName\trunk\binto
file:///C:\Users\MyName\dev\ProjectName\*\bin- Restart the Windows Search service.
Right-click onWindows Searchand selectStartorRestart.
That's it! The directories are even unchecked/excluded in the Indexing Options.