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?
- Explorer, batch, or PowerShell solutions are acceptable.
- The ideal solution will work for both Windows 7 and Windows 10, but separate solutions for Windows 7 and Windows 10 are also acceptable.
- 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:
To answer your question:
To search for a specific extension (file type in Windows) use the search query:
.md
files and only those files (should be markdown files):type:".md"
(remember the quotation marks, if you want an exact match)kind:=image
(yes, you can search for this)More info and examples here: https://www.howtogeek.com/73065/learn-the-advanced-search-operators-in-windows-7/