I get an error when I try to copy a file from one location to another ONLY WHEN the file is already present in the destination. This happens inspite of setting the overwrite flag to true.
I am not getting any clue. This is the code.
System.IO.File.Copy(source, destination, true);// goes fine as the destination file is not present
System.IO.File.Copy(source, destination, true);// Throws the exception
//"Access to the path 'C:\\Program Files (x86)\\testapp\\map\\sometext.txt' is denied."
Please guide.
Thanks Sunil