MATLAB Function Reference
  Go to function:
    Search    Help Desk 
dir    Examples   See Also

Directory listing

Syntax

Description

dir lists the files in the current directory.

dir dirname lists the files in the specified directory. You can use pathnames and wildcards.

names = dir('dirname') returns the list of files in the specified directory (or the current directory if dirname is not specified) to 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, ls, type, what

[ Previous | Help Desk | Next ]