CopyFile

CopyFile["file1", "file2"]
copies to .

DetailsDetails

  • must already exist; must not.
  • CopyFile sets the modification date for to be the same as for .
  • CopyFile returns the full name of the file it copies to, and $Failed if it cannot do the copy.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

The name of the file to copy:

In[1]:=
Click for copyable input

Copy the file:

In[2]:=
Click for copyable input
Out[2]=

Import the new file:

In[3]:=
Click for copyable input
Out[3]=

Delete the file:

In[4]:=
Click for copyable input
New in 2
New to Mathematica? Find your learning path »
Have a question? Ask support »