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, newPa
This can help you:
I use this and it works,
File.Copy(src,des,true); //(string source, string destination, bool overwrite)
Reference (MSDN): File.Copy Method (String, String, Boolean)