fullfile to contain multiply file extension
조회 수: 9 (최근 30일)
이전 댓글 표시
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
채택된 답변
Lluis Roca
2013년 5월 7일
편집: Lluis Roca
2013년 5월 7일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!