3

Windows 10 file explorer's search tools let you insert type: into the search box. I cannot figure out what this is, what the possible values are, and/or which files qualify for them.

  • The Advanced Query Syntax docs do not list type.
  • Perceived Types docs may possibly refer to it with the value images, e.g. This would match a third-party article that lists type:image. However, I cannot find a JPEG file using either type:images or type:image.
  • A German article says that it (or more precisely, its translation typ) refers to the file extension. But that does not work for me, while it does work with ext.
4

2 Answers 2

3

I found out that the search syntax works differently for folders that are indexed and those that are not indexed. (I think this is very bad.)

For an indexed folder, type:image, type:jpg, type:.jpg and type:=.jpg work.

For an unindexed folder, only type:=.jpg works.

Thanks to IT Thug Ninja for the latter syntax.

1
  • 1
    Good to know. Looks like type: is meant only for searching within indexed locations. Have come across such a situation before, where type:"file folder" keyword didn't work on non-indexed locations.
    – w32sh
    Apr 24, 2021 at 5:36
2

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:

enter image description here

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:

enter image description here

It doesn't even reqire wildcards to match partial strings. type:=~~olde is enough to match any type with "folder" in the description:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .