c# file copy throw exception if file exists code example Example: c# copy file File.Copy(Path.Combine(sourceDir, fName), Path.Combine(distDir, fName));