I am using Winforms, and I am trying to copy a file from one location to another. If a file with the same name is already there, I want to overwrite it. But I get an error like
Check the write permission is allowed for the folder contains the destination file.
Try the following:
System.IO.File.Copy(src, dst, true);
true if you want the existing file will be overwritten.
To change or set file permission click here