Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Replace Method

File.Replace Method

Replaces the contents of a specified file with the contents of another file, deleting the original file, and creating a backup of the replaced file.

Name Description
File.Replace (String, String, String) Replaces the contents of a specified file with the contents of another file, deleting the original file, and creating a backup of the replaced file.
File.Replace (String, String, String, Boolean) Replaces the contents of a specified file with the contents of another file, deleting the original file, and creating a backup of the replaced file and optionally ignores merge errors.

The Replace methods replace the contents of a specified file with the contents of another file. They also create a backup of the file that was replaced.

Community Additions

ADD
Show:
© 2015 Microsoft