I used File.Copy(source, target, True), where source is a full path name, like c:\source.txt and target is a folder, which may contain the same named file. I want to copy source.txt to a target folder and overwrite if the file already exists.
But I got the error:
‘Target is a folder, not a file’
Target must contain a filename too:
If you want to programatically have the same filename just do:
Read the MSDN Documentation to have examples and information about exceptions and use of the method.