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
1 answer

Searching for a file named "test (').txt"

I'm using dotnetzip in my app and I've got an issue report on a crash with files containing '(' and ')' using (ZipFile zip = new ZipFile("test.zip")) { var e = zip.SelectEntries("test (').txt");…
Eric Bole-Feysot
  • 13,949
  • 7
  • 47
  • 53
0
votes
1 answer

Update zip file based on other zip file C#

So i have a zip file in a directory. This zip file contains different kind of files. When a user clicks on a button in my WPF application, the zip file needs to be updated. It needs to check files from another zip file in another directory. If a…
Thomas V
  • 151
  • 14
0
votes
0 answers

dotnetzip and comma separated files

I'm developing a console application with dot net that reads 7zip compressed csv files, and load csv file into a DB. It works well with tab separator, with special characters, but if the file has the "comma" separator, there is an error message "Bad…
Fenuska
  • 118
  • 1
  • 9
0
votes
0 answers

Create multi-file zip from stream and download on the fly

I'm using DotNetZip library to make multi-file zip archive and download it on the fly (no need to wait for download to start). However I can't make it to download instantly. From browser dev console, in network tab I noticed that first zip file is…
0
votes
1 answer

.NET - DotNetZip Backup over the network slow

I am creating a backup software in c# for my organizations. I have a problem with time to do a backup of my workstation to a shared folder on a server. If I directly compress the files to the shared folder with temp file created direct to the…
Lo.
  • 1
  • 2
0
votes
3 answers

Create Zip files in Classic ASP using DotNetZip or SharpZipLib

In ASP.Net two of the possible ways to make the zip files are Sharp Zip Library Dot Net Zip Library How can i use any of these in Classic ASP to make the zip files ? And which one will be better ?
MUS
  • 1,450
  • 4
  • 17
  • 30
0
votes
2 answers

C# DotNetZip progressbar on directory

I have the following code working for a single file zip without any problems. But when I zip (create) from a directory the progressbar goes nuts. Basically, the progressbar goes back and forward nonstop. The image illustrates. Inside the folder…
Linesofcode
  • 5,327
  • 13
  • 62
  • 116
0
votes
1 answer

Enumerate contents of specific folder DotNetZip, without child folders

Using Ionic.Zip I wish to display the files or folders in a specific folder. I am using the SelectEntries method, but it unfortunately is filtering out the folders. Not what I was expecting using '*'. ICollection selectEntries =…
Yoztastic
  • 862
  • 2
  • 8
  • 21
0
votes
1 answer

List All Files in a Directory using Dot Net Zip?

Is there anyway in Dot Net Zip that I can use to list all the names of files in a specific directory? For example, i can specify Directory1 and get File3 and File4 etc ZipFile ------- File1 File2 Directory1 File3 File4 Directory2 …
Ranhiru Jude Cooray
  • 19,542
  • 20
  • 83
  • 128
0
votes
1 answer

Usage of DotNetZip

I am using DotNetZip library to compress files. my code is given below String[] filenames = { "D:\\Data\\ReadMe.txt", "c:\\data\\collection.csv","c:\\ProgramFiles\\reports AnnualSummary.pdf"}; using (ZipFile zip = new ZipFile()) { …
WiXXeY
  • 981
  • 5
  • 19
  • 46
0
votes
0 answers

DotNetZipLib + Krakatoa PRT + C#

so I am writing a C# converter that converts between Maya PDC particle caches and Krakatoa PRT particle caches. I can read and write the PDC files no problem, but I am having issues with the PRT format.…
0
votes
3 answers

How to remove guid from file name when creating zip file?

When user uploads multiple documents I am storing their files in my project like this: Guid id; id = Guid.NewGuid(); string filePath = Path.Combine(HttpContext.Server.MapPath("../Uploads"), Path.GetFileName(id + item.FileName)); …
I Love Stackoverflow
  • 6,738
  • 20
  • 97
  • 216
0
votes
1 answer

DotNetZip - [wildcard.png]

Can you extract on a wildcard? I can see that you can when zipping up files? I will not know the name of the files within the zipped folder, however the type will always be .png and there will only ever be one png file. i.e. …
Clare Barrington
  • 1,135
  • 1
  • 11
  • 28
0
votes
1 answer

DotNetZip - This stream does not support seek operations

When I try and extract the "test.png" I receive the following error: This stream does not support seek operations. Also can a wildcard be used? var entry = zipout["*.png"]; I will not know the same when streaming. var request =…
Clare Barrington
  • 1,135
  • 1
  • 11
  • 28
0
votes
0 answers

Access denied error message when creating multipart zip archive using DotNetZip

Example code: Using Zip As ZipFile = New ZipFile() Zip.AddFile("E:\Projects\HOPS\HOPS v1.56\Website\Photos\Pubs.zip") Zip.MaxOutputSegmentSize = 20 * 1024 * 1024 Zip.TempFileFolder = "E:\Temp\Photos\Temp" …
Rob Nicholson
  • 1,943
  • 5
  • 22
  • 37