'File.Copy' does not overwrite a file

Viewed 66682

Using the following code, I am trying to overwrite a file if it exists. Currenly it throws IOException. How can I fix this problem?

File.Copy(filePath, newPath);
7 Answers
Related