how skip some specific files in multiple subfolders in matlab?
2 次查看(过去 30 天)
显示 更早的评论
I need to skip some specific files in different sub-folders. for example if the filename not contains string charchters such as raw, info, do some operations.
dirName = 'D:\Neda\Pytorch\CAMUS\training\';
fileList = SureScan_getAllFiles(dirName);
for k = 1:length(fileList)-50
filename = fileList{k};
%if filename not contain 'raw') | 'Info_' | 'sequence.mhd' | '_sequence'
% do some operation
end
end
0 个评论
采纳的回答
Walter Roberson
2019-4-27
if ~contains(filename, {'raw', 'Info_', 'sequence.mhd', '_sequence'})
% do some operation
end
contains() requries R2016b or later.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Instrument Control Toolbox Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!