How to count how many sub folders under a folder
조회 수: 87 (최근 30일)
이전 댓글 표시
In a folder, there are many sub folder, how do we count how many sub folder they are?
댓글 수: 1
Stephen23
2016년 3월 4일
편집: Stephen23
2022년 9월 3일
Note that KSSV's answer actually counts the total contents of a folder, including any files.
See also:
As Walter Roberson wrote in that last link: "In short: if your code assumes that '.' and '..' are the first two entries in a directory, your code has a bug (even in MS Windows). If your code assumes that directory entries are returned in any sorted order, your code has a bug (in all OS.)"
답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Search Path에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!