No BSD License
Tony Christney (view profile)
23 Mar 2001
This function finds all files with a specified extension in a directory and all subdirectories.
Watch this File
This function finds all files with a specified extension in a directory and all subdirectories. The file names are returned as a cell array of the fully specified path to the file.
There is also an option to turn off the recursive search of subdirectories.
This has been tested under MATLAB 6, Release 12
This file inspired Another Recursive Find File, Find Files, and Get Extension.
I really like the tool, but it would be even better if it would be possible to run it with wildcards.
For example CV7=findfiles('VC7','J:\Carlos000*\')
Or is it possible?
The function is case sensitive so you may want to add the lower or upper function if you have mixed case for filenames. Otherwise this is an excellent utility.
% look for occurences of ['.' extension] in the file name
% modified with lower function to eliminate case sensitivity
extIndices = findstr(lower(['.' extension]),lower(d(i).name));
Very usefull and excellent work!
That's what people need ;)
Thank you very much for this one!!
Works fine under windows.