dir

March 6th, 2008 Posted in Functions

List directory.
dir directory_name lists the files in a directory. Pathnames and
wildcards may be used.  For example, dir *.m lists all the M-files
in the current directory.

D = dir(‘directory_name’) returns the results in an M-by-1
structure with the fields:
name  — filename
date  — modification date
bytes — number of bytes allocated to the file
isdir — 1 name is a directory and 0 not

See also , , type, .

Leave a Reply

You must be logged in to post a comment.