|
"Xiao LI" <clz1978@163.com> wrote in message
news:hd2ih0$47i$1@fred.mathworks.com...
>I used the function "dir" to get all the file names within a certain
>directory in a loop.
> The directory is changing in the loop, but the files in each directory are
> same. What is weird is that the "dir" find no files in one of the
> directories while acturally there are several files in it. Then I check
> the directory independently(not in a loop) and the "dir" find those files.
> I don't know why. The memory full ?
Impossible to say. How, specifically do you call DIR? Are you certain that
the way you're actually calling it is the way you think you're calling it?
For example, there's a difference between:
D = dir('abc*')
and
D = dir('abc')
Are you sure you're calling DIR in the correct directory? Being one level
higher or lower in a directory structure can make a huge difference on what
DIR can 'see'.
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|