Windows Advanced Query Syntax -- cumbersome, but useful!

Remember back in the Windows 2000 and Windows XP days? Hit F3 and have a set of fields you could type in to find about anything? Well in Windows Vista and Windows 7 that's gone and the search UI is utterly atrocious. Enter AQS.

There's more on the subject here, but it looks like a SQL-esque sort of filtering syntax to let you narrow down your search results.

Let's say you want to see all the JPG or PNG files starting with the letters "map" under the normal Windows webroot:

view plain print about
1folderpath:C:\InetPub\WWWRoot\* filename:map ext:(jpg OR png)

It took me 45 minutes to figure that out. Thanks MS. "Efficient" you are not, but at least you've provided a way to do this since you stripped all the decent UI for doing searches out of Windows after XP. Until I added the parens around the file extensions it found all the JPGs with MAP in the name and ALL the PNG files in the folder. Also not that without the wildcard at the end of the file path it only searches that folder... you have to add the wildcard to have it search the entire tree (actually kinda nice if you have a set of folders with a common portion of the name). Also interesting is the fact that "map" is the same as "*map*".

I guess this is gonna take a while to get used to... but since I'm stuck on Windows 7 at work, I suppose I'll figure it out. ;)

Oh, and there is a semi-decent AQS reference at the MSDN page on AQS. At least it's more complete than the link at the beginning of this post.


Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Ugh, and the "OR" has to be in capitals otherwise it won't work. How can they go from a cute animated dog with a nice GUI for morons and an alternative nice GUI for intermediate users to such a rotten system in 7? Ye gods!
# Posted By Gary Fenton | 10/7/10 9:19 PM
Cuz they were trying to be more Mac-like? Err, sorry... more UNIX-like. Spotlight rocks.

But yeah, agreed, Gary. Apparently if you hit WinKey-F (the start menu keyboard key) in an Explorer window, you get the Windows Find panel and if you then click in the search criteria box you get a bunch more options for criteria... but still. It's buried, it's ugly and it's just plain bad.
# Posted By Jared Rypka-Hauer | 10/18/10 5:36 PM
This is a test comment to make sure I've actually un-borked my BlogCFC install. I overwrote my blog.ini file, and I had 3 blog definitions in there!

# Posted By Jared Rypka-Hauer | 10/22/10 4:08 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.7. Contact Blog Owner