Wolfram Language

Control Overwrite Behavior in Export

Export now takes the OverwriteTarget option, which can specify what to do when a file with the same name exists.

Export into a non-existing file.

Exporting new content into the same file overwrites the old file.

Use the OverwriteTarget to avoid overwriting existing content.

In addition, using OverwriteTarget"KeepBoth", Export automatically chooses a suitable name for the new file.

Some file formats, such as HDF5 and FITS, also support OverwriteTarget"Append", which allows adding data to an existing file.

Export a single image to a FITS file, then append another image.

Related Examples

de es fr ja ko pt-br zh