Use File.Copy method to make copy of an existing file.
Add the path of the file you want to copy.
String myPath = @"D:\one.txt";
Now copy the above file to the following file −
String myPath = @"D:\one.txt";
Use the File.Copy method with both the source and destination file.
File.Copy(myPath,newpath);
Example
using System;
using System.IO;
public class Program {
public static void Main() {
String myPath = @"D:\one.txt";
// the file will get copied here
String newpath = @"D:\two.txt";
// copying file
File.Copy(myPath,newpath);
}
}