Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
FileTools[Copy] - copy a file
Calling Sequence
Copy(source, destination, opt1)
Parameters
source
-
string; source filename
destination
string; destination filename
opt1
(optional) name; argument
Description
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.
Examples
See Also
file_types, FileTools, FileTools[Binary][Close], FileTools[Binary][Open], FileTools[Remove], FileTools[Text][Close], FileTools[Text][Open], FileTools[Text][ReadLine], FileTools[Text][WriteLine], IO_errors
Download Help Document