Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


copies from the local or cloud file file1 to the local or cloud file file2.

Details and OptionsDetails and Options

  • file1 must already exist; file2 must not.
  • CopyFile sets the modification date for file2 to be the same as for file1.
  • CopyFile returns the full name of the file it copies to and $Failed if it cannot do the copy.
  • CopyFile works on cloud and local objects and can copy between local and cloud files.
  • Files can be specified either using "path" or File["path"].
  • CopyFile has the following option:
  • OverwriteTargetFalsewhether to overwrite if the target file already exists

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

The name of the file to copy:

Click for copyable input

Copy the file:

Click for copyable input

Import the new file:

Click for copyable input

Delete the file:

Click for copyable input
Introduced in 1991
| Updated in 2016