Windows – Searching Windows by File Type

searchwindows

Although Windows defines the file type on the basis of the file extension, some types cover multiple extensions (e.g., "JPEG Image" covers .JPG and .JPEG), and others use extensions that are substrings of other extensions for unrelated types (e.g., "Markdown files" are .md, which is a substring of .mdb (an Access database) and .mdi (Microsoft Document Image file). If I want to search for "JPEG Image", or "Markdown file", and get only the required file types… how do I do it?

  1. Explorer, batch, or PowerShell solutions are acceptable.
  2. The ideal solution will work for both Windows 7 and Windows 10, but separate solutions for Windows 7 and Windows 10 are also acceptable.
  3. I would prefer not having to analyze and use explicit file extensions in the search.

Best Answer

A few things about Windows and the search function in the File Explorer:

  1. Windows doesn't know about mime-types such as "JPEG Image" or "Markdown file" (or their respective (sub-/super-)types
  2. The search is very powerful, if used correctly.

To answer your question:

To search for a specific extension (file type in Windows) use the search query:

  • Search for all .md files and only those files (should be markdown files): type:".md" (remember the quotation marks, if you want an exact match)
  • Search for all images: kind:=image (yes, you can search for this)
  • You can combine all filters and search terms how you like it.

More info and examples here: https://www.howtogeek.com/73065/learn-the-advanced-search-operators-in-windows-7/

Related Question