CopyFile

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

Details and OptionsDetails and Options

  • 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.
  • CopyFile works on cloud objects, and can copy between local and cloud files.

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
Introduced in 1991
(2.0)
| Updated in 2014
(10.0)