searchin for an M file in all folders of my PC.
Show older comments
I want to search for an M file in all the folders of my PC.
I do not want to search in every folder individually.
1 Comment
Star Strider
on 1 Mar 2026
What operating system are you using?
Answers (3)
Paul
on 1 Mar 2026
d = dir("C:\**\filetofind.m")
Walter Roberson
on 1 Mar 2026
Edited: Walter Roberson
on 1 Mar 2026
You could consider using command line tools
[status, result] = system('dir /s *FILENAMEGOESHERE*');
Image Analyst
on 1 Mar 2026
0 votes
Try "Everything" by voidtools: https://www.voidtools.com/
It can give you nearly instant results on where files live. Not like the Windows search utility that takes forever.
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!