image thumbnail


version (1.82 KB) by Joseph Burgel
Do a recursive search for files.


Updated 28 May 2009

View License

Returns a cell array of all files matching the wildcard expression "refiles" beginning in the root folder "root". Includes subdirectories.

mfiles = getfilenames('c:\','*.m') will return all .m files on the c drive to the cell array "mfiles".

Cite As

Joseph Burgel (2021). getfilenames.m (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!