## File::Replace method


Replaces the contents of a one file with another and creates a backup of the replaced file.

```cpp
static void System::IO::File::Replace(const String &sourceFileName, const String &destinationFileName, const String &destinationBackupFileName, bool ignoreMetadataErrors=true)
```


| Parameter | Type | Description |
| --- | --- | --- |
| sourceFileName | const String\& | A name of the file to replace with |
| destinationFileName | const String\& | A name of the file to replace |
| destinationBackupFileName | const String\& | A name of the backup file |
| ignoreMetadataErrors | bool | Specifies if the merge errors from the replaced file to the replacement file should be ignored (true) or not (false) |

## See Also

* Class [String](../../../system/string/)
* Class [File](../)
* Namespace [System::IO](../../)
* Library [Aspose.PUB for C++](../../../)
