I am trying to search through roughly 2000 .csv files to find the one that matches user input. The user input is in the form of a string, so I have a string 'R' that I want to include in my DIR search. I also want to use the wildcard '*' in the DIR function because the file names are much more complex than the user input 'R'. Is there a way to search my files using both a predefined string 'R' and wildcard? I know I could use a string and wildcard together in the form DIR('*filesearch'), but I want to utilize user input from a GUI rather than have the user go into the code and include their search words explicitly in the DIR function.
MATLAB: Use dir with a defined string AND wildcard
csvdirguisearchstringwildcard
Related Question
- Comparing strings with wildcards
- Using fullfile when you need to pass a string as an input argument with readable TreatAsEmpty
- Conditional with string wildcard
- Analyse files in a different folder than current folder
- Is there a way to tell uigetfile to start browsing in a folder other than the current one
Best Answer