copy a file
Copy(source, destination, opt1)
string; source filename
string; destination filename
(optional) name; argument
The Copy(source, destination) command copies the file source to the file named destination.
The Copy function returns the number of bytes copied.
The optional argument force controls Copy's behavior when a file named destination exists. If force=false then an error is raised and the copy does not occur. This is the default behavior. If force=true then the destination file is replaced by the copy.
If source refers to a file currently opened by Maple, it is flushed before being copied. If destination is opened by Maple, it is closed before the copy.
If an error occurs during the copy, the contents of destination are unspecified.
An exception is raised if source and destination are the same.
An exception is raised if source is a directory.
If the user does not have permission to perform the operation, an exception is raised.
FileTools[Text][WriteLine]⁡testfile,this is a test
this is a test
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.