23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

copyfile<br />

2copyfile<br />

Purpose Copy file<br />

Graphical<br />

Interface<br />

2-336<br />

As an alternative to the copyfile function, you can copy files using the Current<br />

Directory browser. To open it, select Current Directory from the View menu<br />

in the <strong>MATLAB</strong> desktop.<br />

Syntax copyfile source dest<br />

copyfile source dest writable<br />

status = copyfile('source','dest',...)<br />

[status,msg] = copyfile('source','dest',...)<br />

Description copyfile source dest copies the file, source, to directory or file, dest. The<br />

source and dest arguments may be absolute pathnames or pathnames relative<br />

to the current directory. The pathname to dest must exist, but dest cannot be<br />

an existing filename in the current directory.<br />

copyfile source dest writable makes the destination file writable<br />

following the file copy.<br />

status = copyfile('source','dest',...) returns a status of 1 if the file<br />

is copied successfully and 0 otherwise.<br />

[status,msg] = copyfile('source','dest',...) returns status and a<br />

nonempty error message string when an error occurs.<br />

Example To make a copy of a file in the same directory,<br />

See Also delete, mkdir<br />

copyfile myfun.m myfun2.m<br />

To copy a file to another directory, keeping the same filename,<br />

file_copied = copyfile('myfun.m','../testfun/private')<br />

file_copied =<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!