如何在C#中解压缩.7zip文件扩展名? [英] How to Unzip the .7zip file extension in C#?

查看:146
本文介绍了如何在C#中解压缩.7zip文件扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在C#中解压缩.7zip文件扩展名?

How to Unzip the .7zip file extension in C#??

public static void Extractallfiles(string srcPath, string destPath)
      {
          ZipForge archiver = new ZipForge();            
          archiver.FileName = srcPath;
              // Open an existing archive
              archiver.OpenArchive(System.IO.FileMode.Open);
              // Default path for all operations             
              archiver.BaseDir = destPath;
              // Extract all files from the archive to C:\Temp folder
              archiver.ExtractFiles("*.*");
              // Close archive
              archiver.CloseArchive();
      }

This code is doesn't support for .7zip format file, No issue with .zip file extension.
Pleas share if you have any inputs on this

推荐答案

选中此

用于7压缩存档DLL的C#(.NET)接口 [
Check this

C# (.NET) Interface for 7-Zip Archive DLLs[^]


尝试以下
用于7压缩归档dll的C#(.net)接口
用于7-Zip存档DLL的C#(.NET)接口
Try following
C# (.net) interface for 7-Zip archive dlls
C# (.NET) Interface for 7-Zip Archive DLLs


这篇关于如何在C#中解压缩.7zip文件扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆