Find number of files in multiple subfolders with specific extension
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
Hello,
I have multiple sub folders in one main folder. These multiple sub folders contains files with the same extension .pgm. How do I go about finding the total number of files in all the subfolders with that specific extension?
I am trying the following:
x = '*.pgm';
AA = size(dir(x),1)
How do I then go through each subfolders?
댓글 수: 0
답변 (1개)
  Image Analyst
      
      
 2016년 11월 11일
        dir() can now look inside subfolders if you use two asterisks . See the help.
댓글 수: 2
  Image Analyst
      
      
 2016년 11월 11일
				You didn't use it correctly. Check the help again. See my attached demo for how to use it.
참고 항목
카테고리
				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!