Questions tagged [dotnetzip]

Questions dealing with the DotNetZip open-source zip library for .NET

DotNetZip is an open source zip library. DotNetZip works on PCs with the full .NET Framework, and also runs on mobile devices that use the .NET Compact Framework. Silverlight is also supported.

Below is an example of using the library with C#:

 using (ZipFile zip = new ZipFile())
 {
     // add this map file into the "images" directory in the zip archive
     zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
     // add the report into a different directory in the archive
     zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files");
     zip.AddFile("ReadMe.txt");
     zip.Save("MyZipFile.zip");
 }

Note: Just for reference the project builds into Ionic.Zip.dll

Installation

DotNetZip can most easily be installed through its NuGet package.

Install-Package DotNetZip
460 questions
1
vote
2 answers

Visual Studio Build Release with DotNetZip

I've written a program in C# that uses DotNetZip but when I go to build the exe in Release configuration it can't find Ionic. I followed these instructions: http://dotnetzip.codeplex.com/wikipage?title=Getting-Started&referringTitle=Home
Donnachaidh
  • 159
  • 1
  • 11
1
vote
1 answer

Extract only XML files from a zip using DotNetZip

I want to extract all XML files in the archive, I am using DotNetZip in extracting files. In the Documentation of DotNetZip this is the example: using (ZipFile zip = ZipFile.Read(zipArchiveName)) { zip.ExtractSelectedEntries("name = *.xml and …
jomsk1e
  • 3,585
  • 7
  • 34
  • 59
1
vote
1 answer

How To Open a Media File From a Zip File "Directly" (Without Extracting it)?

In C#, I'm using both the DotNetZip and the System.Windows.Media I have a zip file that contains some songs, and I want to play them directly from the zip file without having to extract them .. Now I manged to get a stream to the sound file: Stream…
vexe
  • 5,433
  • 12
  • 52
  • 81
1
vote
1 answer

Can ILMerge be used on DLLs in InstallShield CustomActions?

I created a C# dll that is dependent on the DOTNETZIP "Ionic.Zip.dll". This custom assembly will be used as an InstallShield Custom Action and enter into the Binary table. When the Custom Action is executed, I get the following error information in…
1
vote
3 answers

Specify an order while unzipping files

I am using DotNetZip library to zip my files programatically. The resultant zip file is then uploaded onto a server using SFTP. My question is if there a way I can specify the order in which the files should be unzipped on the server. I am not sure…
Nishant
  • 905
  • 1
  • 16
  • 36
1
vote
1 answer

DotNetZip extracting to stream problems using provided code sample

I am atempting to open a zip file and extract a password and 256 AES encrypted text file into a stream which I can read WITHOUT puting a copy of the text onto the drive. If I understand what I want to do correctly, using a stream will acomplish…
user1500403
  • 551
  • 8
  • 32
1
vote
2 answers

Problems Unzipping and Re-zipping an XAP file during installation to Modify a Config File

I have an interesting dilemma to which, I hope, someone may have an answer. My company has a very complex web application which we deliver to our clients via an InstallShield multi-instance installer package. The application is written in ASP.NET…
1
vote
1 answer

Can't Delete zip files after extracting them

I have a method that extracts multiple zip files but can't delete them until application close. I think it's a bug in DotNetZip version 1.9.1.5 library. my zip files: Hezareh.z01 Hezareh.z02 Hezareh.z03 Hezareh.zip code to extract files: …
Jalal
  • 6,594
  • 9
  • 63
  • 100
1
vote
1 answer

To create zip file that containing mdf file in C#

I have .mdf and .ldf file in my local device. I want to create zip that two files. I use DonetZip. But it didn't show me any error and also the program is not working. How should I do and I want some example to zip .mdf and .ldf files.
Myo Thu Zar Kyaw
  • 137
  • 1
  • 3
  • 11
1
vote
1 answer

DotNetZip FileIOPermission - can't add files to zip, though I have rights

I completely fail to get dotnetzip to add files to a .zip file i can: using (ZipFile zip = new ZipFile()) { zip.AddEntry("test.txt", DateTime.Now.ToString()); zip.Save(Response.OutputStream); } This is completed correctly and produces a zip…
Steen
  • 2,749
  • 2
  • 20
  • 36
0
votes
1 answer

Error when trying to extract with DotNetZip

I have a program that unzips downloaded files through DotNetZip when the download is finished. I get the save-path from a .txt-file, because it has to be extracted to a specific folder in a folder-system. There is one folder for files with no…
asdasdad
  • 832
  • 3
  • 15
  • 27
0
votes
1 answer

Connection being closed when trying to send large zip file

What I'm trying to accomplish is to allow users to download multiple files from silverlight application. To do this I've decided to use DotNetZip library and ASP.NET handler that will take care of getting all files from database and sending them to…
Jarek
  • 3,359
  • 1
  • 27
  • 33
0
votes
3 answers

Powershell Version 2 Load DLL for use on persistent connection's invoke command scriptblock

Does anyone know how I can load a DLL without having it on each remote server I am using in a persistent connection and running the invoke-command cmdlet with? I am using DotNetZip to backup folders on about 13 servers. Everything is working…
user1161625
  • 642
  • 1
  • 8
  • 13
0
votes
1 answer

How to compress so that zip-archive has the same timestamp as source file/source folder

how do I batch compress some files/folders in individual zip-files so that each individual zip-archive has the correct timestamp (created/modified) as its source file/folder to preserve the chronology of a folder of zip-archives ? I have downloaded…
0
votes
2 answers

DotnetZip path issue

When using dotnetzip it does not only zip the directory like c:\users\tintin\this but it will also zip users/tintin, which I don't want. I want it to zip the last folder so, this and all files in there. I use the…