IO Exception was unhandled
the file already exists
I just want to copy the files no matter if they already exist or not. Below is my code. What can I add to make it just copy no matter what?
Expand|Select|Wrap|Line Numbers
- private void button2_Click(object sender, EventArgs e)
- {
- string fileToCopy = "S:/coversheets/worker.htm";
- string newLocation = "F:/rbcover.htm";
- System.IO.File.Copy(fileToCopy, newLocation);
- }