| MATLAB Function Reference | Search  Help Desk |
| copyfile | See Also |
Syntax
copyfile('source','dest')
copyfile('source','dest','writable')
status = copyfile('source','dest')
[status,msg] = copyfile('source','dest')
Description
copyfile('source','dest')
copies the file source to the new file dest. source and dest may be absolute pathnames or pathnames relative to the current directory. The pathname to dest must exist, but dest cannot be an existing filename in the current directory.
copyfile('source','dest','writable')
checks that dest is writable.
status = copyfile('source','dest')
returns 1 if the file is copied successfully and 0 otherwise.
[status,msg] = copyfile('source','dest')
returns a nonempty error message string when an error occurs.
See Also
delete, mkdir