| << cd | Files and folders functions | diff_file >> |
| copyfile(source, destination) |
| [status, msg] = copyfile(source, destination) |
| [status, msg] = copyfile(source, destination, 'f') |
a string: file or directory.
a string: file or directory.
force copy even destination is not writable.
a logical true or false
a string: error message
copyfile(source , destination) copies the file or directory , source (and subdirectories) to the file or directory, destination.
If source is a directory, destination can not be a file.
copyfile replaces existing files without warning.
copyfile([nelsonroot(), '/etc/startup.m'], [tempdir(), 'startup.m'])
[status, msg] = copyfile([nelsonroot(), '/etc/startup.m'], [tempdir(), 'startup.m'])
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 1.4.0 | input arguments support scalar string array type |
Allan CORNET