Contents Previous Next Subchapters

Copying Files
Syntax cpfile(sourcedestination)
See Also mvfile , exists , listdir

Copies the file specified by source to the file specified by destination, where source and destination are character row vectors. If either of the files is open for reading or writing it is closed before the copy is made. If the copy is successful, the logical scalar "true" is returned, otherwise the logical scalar "false" is returned.

If TEMP is a file in the current directory, you can copy it to the file JUNK by entering
     cpfile("temp", "junk")