({{, (RefLink[OverwriteTarget, paclet:ref/OverwriteTarget]) 
is an option for functions like (RefLink[CopyFile, paclet:ref/CopyFile]) that specifies whether to overwrite if target files already exist.}})

OpenersNotesSection(Spacer1)Details

Typical settings include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Create a file:

Export["file1.jpg",]

Copy the file to a new location:

CopyFile["file1.jpg","file2.jpg"]

Copying the file back fails with (RefLink[OverwriteTarget, paclet:ref/OverwriteTarget])->(RefLink[False, paclet:ref/False]):

CopyFile["file2.jpg","file1.jpg",OverwriteTarget->False]

Use (RefLink[OverwriteTarget, paclet:ref/OverwriteTarget])->(RefLink[True, paclet:ref/True]) to overwrite the existing file:

CopyFile["file2.jpg","file1.jpg",OverwriteTarget->True]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[CopyFile, paclet:ref/CopyFile])  ▪  (RefLink[RenameFile, paclet:ref/RenameFile])  ▪  (RefLink[Export, paclet:ref/Export])  ▪  (RefLink[Permissions, paclet:ref/Permissions])  ▪  (RefLink[Protected, paclet:ref/Protected])  ▪  (RefLink[PartProtection, paclet:ref/PartProtection])}})}})