fullfile to contain multiply file extension
13 views (last 30 days)
Show older comments
Hi,
How can I make that a fullfile contain multiply file extension (CSV, XLS, ODS) so my baseFiles have all the files with these extensions?
This code does not work:
fPattern = fullfile(handles.sourceFolder, '*.csv', '*.xls', '*.ods');
baseFiles = dir(fPattern)
Thanks.
0 Comments
Accepted Answer
Lluis Roca
on 7 May 2013
Edited: Lluis Roca
on 7 May 2013
Try:
filePatternCSV = fullfile(handles.sourceFolder, '*.csv');
csvFiles = dir(filePatternCSV);
filePatternXLS = fullfile(handles.sourceFolder, '*.xls');
xlsFiles = dir(filePatternXLS);
filePatternODS = fullfile(handles.sourceFolder, '*.ods');
odsFiles = dir(filePatternODS);
allFiles= vertcat(csvFiles,xlsFiles,odsFiles);
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!