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
0
votes
2 answers

Email attachment is being sent as a file instead of a zip file

So I am trying to attach a zip file of pdfs to an email and it comes in as a file not as a zip. I can open it in notepad but its just a bunch of random characters. Here is my method to send the email: public static void SendEmail(List
0
votes
0 answers

Getting zip files without full directory path using dotnetzip library

I am trying to download a zip of pdf files without having to go through the full directory path So when I am downloading the files the user will have to click through the entire path to get to the pdf. I want just the files to download without the…
0
votes
2 answers

Playing an MP4 in a zip file through a network location

I'm building a video system, and have came across a problem of accessing a video held in a remote location. Now predicament is that I don't want to mess around with the zip file by extracting the data, this would take too long from a user…
wonea
  • 4,783
  • 17
  • 86
  • 139
0
votes
1 answer

Create a zip file for images converted from PDF to PNG

I want to save files that are converted from a PDF to a PNG in a zip file. So far, I am able to convert a single PDF document into a PNG format, but if the PDF has multiple pages my application only coverts and save them individually (one at a time)…
Opu
  • 43
  • 1
  • 8
0
votes
0 answers

How to decompress a multi part zip file created using DotNetZip library?

I created multipart zip file using DotNetZip library, following is the code used to create: public Boolean CreateZip(string sourceFolder, string destinationZip) { Boolean isZipCreated = false; try { …
0
votes
1 answer

DotNetZip - create zip from accessed file

it is possible to use DotNetZip to create a zip from an accessed file (eg log file from another application) ? so create a zip when the log file gets written through the other application
gert
  • 75
  • 1
  • 6
0
votes
1 answer

Dotnetzip bad state error when extracting a text/XML file

I am trying to store an XML file into a zip using dotnetzip using the following method: private void writeHosts() { XmlRootAttribute root = new XmlRootAttribute(ROOTNAME_HOST); XmlSerializer ser = new…
mcscrilla
  • 1
  • 1
0
votes
1 answer

Uploaded zip file in Azure contains invalid content and cannot be opened

I am using the following code to upload an XML file to an Azure Blob Storage account using the DotNetZip nuget package. XmlDocument doc = new XmlDocument(); doc.Load(path); string xmlContent = doc.InnerXml; …
ArsenalRocks
  • 339
  • 1
  • 4
  • 12
0
votes
1 answer

Getting "it is being used by another process" after trying to extract a ZIP file downloaded from SFTP server using SSH.NET

I got a problem when I want to unzip a file. After I download a file from SFTP, I want to unzip that, but it always tells me it's being used by another process. I want to find the question by google but it seems nobody has this question. Can…
周世華
  • 21
  • 4
0
votes
3 answers

DotNetZip: creating zip with C# permissions issue

I am using DotNetZip and have noticed that i am getting permission issues on Mac's. This seems to only occur when i use content disposition. ie if i just save it to disk using (ZipFile zip = new ZipFile(@"C:\zip\temp.zip")) { // this works…
frosty
  • 5,330
  • 18
  • 85
  • 122
0
votes
0 answers

DotNetZip ExtractAll Zip64

I create a zip File using "UseZip64WhenSaving" option as true. Once I try to extract it with "ExtractAll" method, an exception is thrown saying that the file "nameOfMyFile.z65536" does not exist. It does not happen with files created as normal zip…
0
votes
1 answer

Download multiple selected files of Grid/Telerik Rad from Azure blob storage

I have a grid view/telerik rad grid with check box in each row where user can choose whatever documents do they need to download and there is normal asp.net button outside Grid which can be used to download all selected files from azure blobs to…
suhail
  • 360
  • 1
  • 5
  • 15
0
votes
0 answers

C# DotNetZip pendingoverwrite access denied errors

here is my code... string file = Environment.CurrentDirectory+"\\Downloads\\zipfile.zip"; string unpackDirectory = Path.GetDirectoryName(Environment.CurrentDirectory); var zip = new Ionic.Zip.ZipFile(); zip =…
0
votes
1 answer

How do I remove a zip file in Dotnetzip

I am trying to delete a zip file in DotNetZip as it is like transaction(either do it full or not at all). Currently, I have incremented my count twice, on purpose to break the app and see if it saves the zip. Well it does, it saves the zip with 2…
grozdeto
  • 1,201
  • 1
  • 13
  • 34
0
votes
2 answers

Gridview pagination. "Download All" Only downloads current page

I have a grid view showing product images:
Evik Ghazarian
  • 1,803
  • 1
  • 9
  • 24