haf / DotNetZip.Semverd

Please use System.IO.Compression! A fork of the DotNetZip project without signing with a solution that compiles cleanly. This project aims to follow semver to avoid versioning conflicts. DotNetZip is a FAST, FREE class library and toolset for manipulating zip files. Use VB, C# or any .NET language to easily create, extract, or update zip files.
Other
545 stars 218 forks source link

Zip Extract only particular folder #258

Open M4ntic opened 2 years ago

M4ntic commented 2 years ago

I have a case, where I need to extract Zip file with C# Ionic.zip library. Zip file contains multiple folders and I want to extract and copy every folder exept the root folder to specific destination.

Zip file named as Example.zip and directory structure will be like

Root Directory\Sub Directory 1\file a, file b Root Directory\Sub Directory 2\file c, file d And I want to copy every Sub Directory in a Temp folder so it would look like :

Temp\Root Directory\Sub Directory 1... Do you have any idea how I can do it ?