if(File.Exists(copyPath + "\\" + name)==true) { //删除提示访问被拒绝,增加此行代码 new FileInfo(filePath).Attributes = FileAttributes.Normal; File.Delete(copyPath + "\\" + name); }