Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 550
user3813057 Avatar asked May 21 '15 05:05

user3813057


3 Answers

using the following

"*.m"

will solve your problem.You can find more information on regex to be used in msdn in the following link .Advanced query syntax

like image 177
GingerJack Avatar answered Sep 21 '22 14:09

GingerJack


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.)

like image 37
Syberdoor Avatar answered Sep 19 '22 14:09

Syberdoor


Explorer don't have a function of finding with RegEx. You need to use Power-Shell instead of Win Explorer;

for example: where '(?i)Out' is a regex

Get-ChildItem -Path e:\temp -Recurse -File | Where-Object { $_.Name -match '(?i)Out' }

enter image description here

like image 23
Aliaksandr Shpak Avatar answered Sep 18 '22 14:09

Aliaksandr Shpak