Search code examples
regexwindowsfull-text-search

How to search files in windows file explorer with specified extension name?


We can search files in windows 7 or higher version using the following tool: (I don't have image uploading privilage. I mean the top-right area in windows file explorer.)

When I search for MATLAB files using "*.m", it not only returns *.m files, but also returns *.mp3, *.mp4 files. Is there any way to show *.m files exclusively?

Thanks!


Solution

  • I assume you used the quotation marks here to show the text you typed, because ironically the exact way how it should work is to put the search in quotation marks...

    so

    *.m

    finds .mp3 as well as .m but

    "*.m"

    should only find the .m files. Alternatively you could also write

    ext:".m"

    which would guarantee that only extensions are searched. (Although I am not sure if this is ever necessary here, because while windows can have a dot in the filename and also can have files without extensions I am not sure if it is possible to have both at the same time.)