how do I count number of folder?

66 visualizzazioni (ultimi 30 giorni)
YJ
YJ il 7 Ott 2014
Risposto: Image Analyst il 8 Ott 2014
I do know how to count the number of files within the folder like this,
but is their way to file the number of folder inside the certain folder? (not file)

Risposta accettata

José-Luis
José-Luis il 7 Ott 2014
all_files = dir;
all_dir = all_files([all_files(:).isdir]);
num_dir = numel(all_dir);

Più risposte (1)

Image Analyst
Image Analyst il 8 Ott 2014

Categorie

Scopri di più su File Operations in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by