f



List of files from a directory

Dear All,

I wuold like to import in a data structure in my workspace a list with
all the filenames in a directory of my hard drive (even only the current directory wuold be fine). Does anybody know which command should I use? Or where I can find functions to interact with directories?

Thanks for the help.

Regards.

Pasquale.
0
1/18/2009 2:40:04 AM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

2 Replies
465 Views

Similar Articles

[PageSpeed] 52

"Pasquale Aliberti" <alibertipasquale@gmail.com> wrote in message <gku4q4$eig$1@fred.mathworks.com>...
> Dear All,
> 
> I wuold like to import in a data structure in my workspace a list with
> all the filenames in a directory of my hard drive (even only the current directory wuold be fine). Does anybody know which command should I use? Or where I can find functions to interact with directories?
> 
> Thanks for the help.
> 
> Regards.
> 
> Pasquale.

doc dir

files = dir('dirname')

0
someone3 (1980)
1/18/2009 3:50:04 AM
Have a look at the dir function.  

D = dir

returns an nx1 structure where n is the number of files in the current directory.  The see also list in the help for dir should point you in the right direction for most of what you need.




NLj%[`jYYjWPdZPjPX0aLZW_j+M_SqZLM[R_DLZS8jXN`jTZqLxLPjLSZTV
0
spamanon (2437)
1/18/2009 3:57:02 AM
Reply: