This function returns all files in a directory (and optionally sub-directories) that match an expression (either regular or glob).
-The expression to match
-Recursive? (should sub-directories be searched?)
-Type (either 'glob' or 'regexp')
-Directory (specify the directory to search)
-Exclude expression (if a file matches the original expression, but also contains the exclude expression, it will be rejected)
Outputs a cell array of file names.
Brian (2021). getfiles (https://www.mathworks.com/matlabcentral/fileexchange/42076-getfiles), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!