MATLAB Functions Help Desk

dir

Purpose

Directory listing

Syntax

Description

dir, by itself, lists the files in the current directory.

dir dirname lists the files in the specified directory. Use pathnames, wildcards, and any options available in your operating system.

names = dir('dirname') or names = dir 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 if name is a directory; 0 if not

Examples

See Also

!, cd, delete, type, what

[ Previous | Help Desk | Next ]