Navigation

Operators and Keywords

Function List:

C++ API

Function File: movefile (f1)
Function File: movefile (f1, f2)
Function File: movefile (f1, f2, 'f')
Function File: [status, msg, msgid] = movefile (…)

Move the source files or directories f1 to the destination f2.

The name f1 may contain globbing patterns. If f1 expands to multiple file names, f2 must be a directory. If no destination f2 is specified then the destination is the present working directory. If f2 is a file name then f1 is renamed to f2.

When the force flag 'f' is given any existing files will be overwritten without prompting.

If successful, status is 1, and msg, msgid are empty character strings (""). Otherwise, status is 0, msg contains a system-dependent error message, and msgid contains a unique message identifier. Note that the status code is exactly opposite that of the system command.

See also: rename, copyfile, unlink, delete, glob.

Package: octave