The full name of the propety that appears in the Type
column is System.ItemTypeText
. The operative word there is "Text". You're searching the text description of the type (if you're searching for a specific extension, just search on the Extension
property).
There are several query operators that are string-specific, but not widely-known, most likely becaause they are buried toward the end of Using Advanced Query Syntax Programmatically. (doesn't exactly bbubble to to the top when you search the web for "Explorer Search syntax" :D )
COP_VALUE_STARTSWITH ~<
System.FileName:~<"C++ Primer"
COP_VALUE_ENDSWITH ~>
System.Photo.CameraModel:~>non
COP_VALUE_CONTAINS ~= or ~~
System.Subject.~=round
or System.Search.Autosummary:~~round
COP_VALUE_NOTCONTAINS ~!
System.Author:~!"sanjay"
COP_DOSWILDCARDS ~
System.FileName:~"Mic?osoft W*d"
COP_WORD_EQUAL $= or $$
System.StructuredQuery.Virtual.From:$="Sanjay Jacobs"
COP_WORD_STARTSWITH $<
System.Author:$<"San"
or System.Filename:$<"Micro Exe"
Searching in non-indexed locations seems to be less forgiving regarding syntax, for instance, searching Program Files
with Type:"file folder"
yields "No items match your search."
, using type:="file folder"
yield the expected results:
But the real "magic bullet" is COP_VALUE_CONTAINS (
~~
)
. Searching Program Files
with type:Configuration
yields no results, but ~~
matches even partial strings. type:~~config
yields types I wasn't even aware of:
It doesn't even reqire wildcards to match partial strings. type:=~~olde
is enough to match any type with "folder" in the description:
type:=.txt
ortype:=.jpg
... I think you need to prefix the dot before the extension "type". That's just a guess that after quick testing.type:folder
. Likewise,-type:folder
searches for files only (excluding directories). Do not confuse this withkind:folder
, which will find true file system folders, but also collection files like*.CAB
and*.ZIP
."... you can also usetype:script
ortype:doc
and even negate those out too.:=
syntax? I haven't seen it anywhere before.