finding how many folders are in an other folder and how many files (.xls files) are in each folder
18 ビュー (過去 30 日間)
古いコメントを表示
For example there is a folder in name of 'a'. in 'a' there are these folders: 'b','c','d','e',... and in 'b' there are 4 .xls files and in 'c' there are 7 .xls files,.... now it's needed knowing how many folders are in 'a' and in each folder how many .xls files there are.
0 件のコメント
採用された回答
Fangjun Jiang
2011 年 9 月 16 日
FolderA='C:\mydocument\c';
f=dir(FolderA)
will give you a list of files and folders. Checking f.isdir will tell you how many are folders. Note that f(1) and f(2) are usually '.' and '..'
Files=dir(fullfile(FolderA,'b\*.xls')) will tell you how many .xls files are in the \b folder.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!