Function Reference
— Built-in Function: [err, msg] = rename (old, new)

Change the name of file old to new.

If successful, err is 0 and msg is an empty string. Otherwise, err is nonzero and msg contains a system-dependent error message.

See also: ls dir