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에서 File Operations에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

