dir

March 6th, 2008 Posted in Functions

List directory.
dir directory_name lists the files in a directory. Pathnames and
wildcards may be used.  example, dir *.m lists all the
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 what, , type, delete.

Leave a Reply

You must be logged in to post a comment.