File Exchange

image thumbnail

getfiles

version 1.0.0.0 (2.13 KB) by Brian
Function returns all files in a directory (and optionally sub-directories) that match an expression.

0 Downloads

Updated 03 Jun 2013

View License

This function returns all files in a directory (and optionally sub-directories) that match an expression (either regular or glob).

Inputs are:
-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.

Comments and Ratings (1)

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux