我想从一些旧的压缩文件中删除评论。在ZipArchive中找不到任何"Comment“属性。除了“提取所有文件并将它们添加到一个新的zip文件”之外,还有什么解决方案吗?
发布于 2013-02-07 22:54:01
如果你有可能给我们另一个库,我推荐DotNetZipLib (http://dotnetzip.codeplex.com/),它非常容易使用,你也可以编辑评论。
var file = @"C:\sample.zip";
using (var zip = new ZipFile(file))
{
foreach (var entry in zip.Entries)
{
entry.Comment = string.empty;
}
zip.Save();
}https://stackoverflow.com/questions/14753972
复制相似问题