这是代码 使用(ZipFile zipnew = ZipFile.Read(strPath)) { foreach(ZipEntry zenew in zipnew) {zenew.Extract(exPath); }
zenew.filename = “C:\ TEMP \图像\ fish2.jpg” exPath =“c:\ temp \ members \ 12 \ images”
我收到此错误文件C:\ temp \ Images \ fish2.jpg已经存在。
希望得到答复 感谢
答案 0 :(得分:0)
看起来你需要将Overwrite标志设置为某种东西。这是一个例子:
using (ZipFile zipnew = ZipFile.Read(strPath)) { foreach (ZipEntry zenew in zipnew)
{
zenew.filename="c:\temp\images\fish2.jpg"
exPath = "c:\temp\members\12\images"
zenew.Extract(exPath, ExtractExistingFileAction.OverwriteSilently);
}