filenames = filefinder('searchpath','searchterm1','seartchterm2',...);
This function will return a list of file names that contain all of the given search terms. All entries to this function should be strings. All search terms are case sensitive!
filenames is a cell array.
Let's presume that within 'searchpath' there are, in total, five files:
3) future predictions.txt
5) predictions for future.txt
Using the search term '.txt' returns a cell array with all five file names.
Using the search term 'tions' returns a cell array with filenames 2 through 5.
Using the serach term 'future' returns a cell array with filenames 1,3, and 5.
Using the search terms 'future' and 'prediction' returns a cell array with filenames 3 and 5.
Using the search term 'future prediction' returns a cell array with only filename 3. Thus one can combine two independent search terms in an ordered search term.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.