Navigation

Operators and Keywords

Function List:

C++ API

: [status, msg, msgid] = copyfile (f1, f2)
: [status, msg, msgid] = copyfile (f1, f2, 'f')

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

The name f1 may contain globbing patterns. If f1 expands to multiple filenames, f2 must be a directory.

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: movefile, rename, unlink, delete, glob.

Package: octave