SyntaxFix
Write A Post
Hire A Developer
Questions
The easiest method you can use is this:
System.IO.File.Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName);
This will take care of everything you requested.