OverwriteTarget

OverwriteTarget

is an option for functions like CopyFile that specifies whether to overwrite if target files already exist.

Details

  • Typical settings include:
  • Automaticautomatic settings
    Falseoperation fails if it needs to overwrite existing content
    Trueoverwrite existing content

Examples

Basic Examples  (1)

Create a file:

Copy the file to a new location:

Copying the file back fails with OverwriteTarget->False:

Use OverwriteTarget->True to overwrite the existing file:

Introduced in 2016
 (11.0)