How do I count the number of .CSV files in a folder?
304 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I would like to know how to count the number of .CSV files in my folder? I have to do this for multiple folders so I would like to choose them.
So far I have something like this...
source_dir = uigetdir([]);
d = dir([source_dir, '\*.csv']);
n=length(d(not([d.isdir])));
but I get an error at the second line. Help!
0 Kommentare
Antworten (1)
Image Analyst
am 18 Nov. 2013
n=length(d)
6 Kommentare
Miranda Zhang
am 3 Jun. 2017
Do you use Mac OS? I had the same problem but then realised it's because I'm supposed to use '/' instead of '\' because it's not Windows.
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!