khoo
Posts:
63
Registered:
8/9/08
|
|
Re: How to open a folder and count the number of images at inside?
Posted:
Apr 20, 2009 3:02 PM
|
|
"Blaine " <EvilDonut0@gmail.com> wrote in message <gsifah$5ud$1@fred.mathworks.com>... > If they are all the same kind of image, > > cd('directory') > d = dir > > eliminate entries '.' and '..', as well as other directories (i always do this as a habbit when looking for files but it is redundant in this case) > > then, > > remove = []; > for i = 1:length(d) > found = 0; > searchString = "file extension"; > found = strcmp(d(i),searchString); > if found ==0 > remove = [remove i]; > end > end > > d(remove) = []; > > the remaining entries in d are the images you want > > Blaine
i will try it..any question dunno will come bak to ask..thx lots..
|
|