Click here to Skip to main content
15,892,005 members
Everything / ZIP

ZIP

ZIP

Great Reads

by Shangwu Qi
A utility application that uses .NET 4.5 ZipFile class to unzip multiple files on file name sequence and save unzipped files to a same root directory.
by Serge Berlin
.NET Library for in-memory GZip and LZMA compression combined with strong BlakeB based stream cipher engine
by Bloody Chicken
This program is designed to upload an XML file and a zip file automatically created to your FTP server. It can be used for software update.
by LeisureBamboo
The decode and encode of multiPage rotate tif.zip

Latest Articles

by honey the codewitch
Easily create zip packages from source code, suitable for upload on CodeProject
by LeisureBamboo
The decode and encode of multiPage rotate tif.zip
by Bjørn
On-the-fly streaming multiple files or directories in a ZIP file without a temp file
by Bloody Chicken
This program is designed to upload an XML file and a zip file automatically created to your FTP server. It can be used for software update.

All Articles

Sort by Score

ZIP 

4 Apr 2014 by Code Help 2014
Are you using Image control or PictureBox? You have posted the question with ASP.NET tag but I think picture box is used in winform applications and not in web applications or ASP.NET.If you are using windows application, use the Image property instead of ImageLocation. Try the following...
25 May 2012 by Wendelius
Hi,I'm struggling with a small problem and I hope that someone could shed some light to it.The problem is that when I create a Zip-file using ZipPackage-class, the package itself is created succesfully, but in some cases the creation of the package slows down dramatically.I can...
14 Aug 2012 by Sergey Alexandrovich Kryukov
You don't need to "run" 7zip. You can use 7zip library for .NET, which is a .NET wrapper around 7-zip library:http://sevenzipsharp.codeplex.com/[^].See also this CodeProject article:C# (.NET) Interface for 7-Zip Archive DLLs[^].As to the file name, you can name your files any way you...
2 Apr 2013 by Matthew Faithfull
You can only do that if you have the complete source code for everything you want in your final exe.If you have then the simplistic answer is to put all the source code in one project and just build the one exe. You could of course build the zlib and zip parts as static libraries and then...
13 Feb 2013 by Sergey Alexandrovich Kryukov
Of course, but it's C, not C++: http://www.gnu.org/software/gzip/[^], http://www.gzip.org/[^].Nevertheless, you can compile this code in a C++ project. Unfortunately, there are no MSBuild project files, you have to make one by yourself.However, GZIP implementation is included in boost,...
4 Mar 2013 by Sergey Alexandrovich Kryukov
RAR is proprietary; I would not advise to use it, but — please see below, you can always un-RAR.Problem 1:If you really need to detect the event like that, it may mean that your architecture seriously needs rethinking. If you still think you need go this way, the solution is to use the class...
17 Nov 2015 by Shangwu Qi
A utility application that uses .NET 4.5 ZipFile class to unzip multiple files on file name sequence and save unzipped files to a same root directory.
10 Sep 2019 by CPallini
This ZipFile.CreateFromDirectory Method (System.IO.Compression) | Microsoft Docs[^] looks interesting.
21 May 2020 by Garth J Lancaster
Add a reference & 'using' statement for System.IO.Compression.FileSystem ref : ZipArchive Constructor (System.IO.Compression) | Microsoft Docs[^] - using the 'stream constructor' gets-around having to add an entire directory using (FileStream...
13 Jul 2020 by Richard MacCutchan
You are trying to remove $path, which is the Archive directory. You need to combine $path with $s and remove that.
18 Nov 2013 by Sergey Alexandrovich Kryukov
Not that I'm against local cultures. Just the opposite. Of course, articles should be published in different languages, it depends on where you publish them. I cannot answer about acceptance of non-English articles (most likely they are not accepted).My point is very different. And this is...
21 Dec 2013 by camel_liu
zip file is rename to htm.I try serval zip files in different articles, everyone is like this.such as:Simple HTTP Server in...
21 Dec 2013 by André Kraak
I experienced no problems with the example you gave.But anyway this is not the place to post these kind of issues, the chance that one of the site admins will see it is small.Please move this to the Site Bugs / Suggestions[^] forum where the site admins will pick it up.
21 Dec 2013 by OriginalGriff
I tried the first article in your list, and clicked on the download.It downloaded fine.WinZip opened it fine, and I extracted all the files.I didn't try the project (I don't need an HTTP server at the moment) but if it unzipped I'm sure it is fine.So it works for me.What am I doing...
4 Apr 2014 by alimz1993
First Solution is Good. correct code:ZipFile zip = new ZipFile("data.zip");using (Stream s = zip["p3.png"].OpenReader()){ Bitmap bitmap= new Bitmap(s); PictureBox picturebox.Image = bitmap;}
8 Oct 2014 by Sergey Alexandrovich Kryukov
It could be corrupted beyond repair with good probability. Why? Because ZIP algorithm is not designed to be error-tolerant; there is no much redundancy. Nevertheless, restoration applications do exist. You can try some:Try to find one: http://bit.ly/1uECKaO[^].This one is even open-source:...
23 Jul 2015 by Sergey Alexandrovich Kryukov
One of the possible solutions is this: if somebody managed to pack files in ZIP, famous 7-zip can unzip it: https://en.wikipedia.org/wiki/7-Zip[^].This is open-source cross-platform product which comes with the C++ 7-zip...
20 Jul 2016 by Member 12619922
I created a backup of a portion of my hard disk which amounted to 11MB. I want to restore this backup but when I double click the file it says : Cannot open file : It does not appear to be a valid archive.What I have tried:Is there still a way to recover this file? One of my hunch is...
14 Jul 2016 by Patrice T
Quote: Is winzip backward compatible?It should.Try another zipper to see if better luck with it.7-Zip[^]Otherwise, I would open the zip in a programmer editor (binary mode) just to see if the zip headers are here or not.UltraEdit: the text editor trusted by millions[^]
29 Sep 2016 by Maciej Los
Check this:Script Get files older than a specified time period PowerShell[^]Delete files older than x-days - Cleanup Script[^]Delete files older than 15 days using PowerShell - Stack Overflow[^]And change to your needs ;)
28 Sep 2018 by OriginalGriff
You can't, not really. You can use different compression formats (like RAR for example) but you will get exactly the same results. When you remove files from the archive - be it Zip or whatever - they will take up the original space, possibly more depending on the two systems file storage...
28 Sep 2018 by DaveAuld
You could use the split function of zip and make smaller chunks and delete each original zip chunk as it is processed.
2 Oct 2018 by #realJSOP
Just iterate the source folder and copy one file at a time. It really is that simple. Of course, you have to make sure the target path exists first, but really, this is minor file system stuff.
1 Jan 2019 by Serge Berlin
.NET Library for in-memory GZip and LZMA compression combined with strong BlakeB based stream cipher engine
18 Feb 2019 by Bloody Chicken
This program is designed to upload an XML file and a zip file automatically created to your FTP server. It can be used for software update.
12 Aug 2019 by LeisureBamboo
The decode and encode of multiPage rotate tif.zip
10 Sep 2019 by RickZeeland
You can use 7zip, see answers here: How would I compress a folder with 7Zip in C#? - Stack Overflow[^] It can be downloaded here: 7-Zip[^]
8 Dec 2021 by OriginalGriff
I suggest that you start by talking to the rest of your class, sie they are having problems answering this question as well: How to link a zip folder in HTML doc[^]
25 May 2012 by Sunny_Kumar_
Hi Mika,Hope this may help you:Creating Zip Files Easily in .NET 4.5[^]Thanks,Sunny K
31 Jul 2012 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
18 Aug 2012 by akshay.nikhare
i am developing a software taht is some what working like an sfx i have created the gui of the exe but not able to give actual functionality because i m not getting that how to i code to build an exe..........
18 Aug 2012 by Wendelius
If I understood your question correctly, you could consider using Managed Extensibility Framework[^]
2 Sep 2012 by Eren GENÇTÜRK
i want to take folder with folderbrowserdialogue and i want to zip it and send ftp server.i write this code but didnt work.exception picture is : http://imageshack.us/f/11/82224641.png/[^] private static void Ziple(string sourceDirName, string destDirName, string pass) { ...
3 Sep 2012 by Kuthuparakkal
First of all I do not see your zip method works. Also it makes huge overhead.So lets approach this as:1. Get memorystream for the file(code efficiency is also reqd, reading byte in chunks)2. Zip the memorystream.3. Get byte array from zipped stream and write it using FTP...
7 Oct 2012 by Sabaat Ahmad
I want to create an application preferably using .NET to generate thumbnails for a custom file type (actually a .zip file). I want that the image i choose should become the thumbnail image in explorer. Can someone please help me?Thnx
7 Oct 2012 by JF2015
See the answer here that provides a VB.NET snippet (should be easily convertible to C#) that does exactly that.http://stackoverflow.com/questions/1193711/changing-extension-icon-programmatically[^]
1 Nov 2012 by Muthanna2010
Hi all this is my first post here I have an application that my company bought the code from a software company I m trying to compile ... but I keep getting errors and I have fixed alot of the broken references(libraries) But the app is missing Unzip libraries that I cannot find...
1 Nov 2012 by Richard MacCutchan
I can see the Unzip links on their website[^]. If you need further information you should ask the people who sold you the software.
1 Nov 2012 by fjdiewornncalwe
If you go to the info zip home page about 1/3 of the way down the page there are all the downloads available. If you don't find what you are looking for there then I suspect you're out of luck.
5 Nov 2012 by Muthanna2010
Thanks for the answers but neither where answers...the downloads are not working ...i downloaded from different web page
25 Jan 2017 by Code Master38
For some reason when I try to unpack a zip it does not update the progress bar any help would be welcomed.Imports Ionic.ZipImports System.ThreadingPublic Class Form1 Private Property CurrentCount As Integer Private Property TotalCount As Integer Private Sub...
1 Jan 2013 by LTMKH
Dear all, I'm currently using Dotnet 4.0 with VS 2010..I want to test zip file using DotnetZip library.this following is my coding :using Ionic.Zip;namespace testzip{ public partial class Form1 : Form { public Form1() { ...
1 Jan 2013 by Christian Graus
This is a setting for winzip, it has nothing to do with your code.
1 Jan 2013 by LTMKH
Dear Christian,Thank for your quick reply...But i wonder that if i use winzip or winrar to zip other file, for example file name 123.bak .Then i use winzip to extract here it not include sub folder. it give me only this file.Ex : 1/ my file name is 123.bak--> after zip this with winzip...
12 Feb 2013 by Alistair Budd
Hi, does anyone have source code for GZIP running under windows visual studio 2010 or 2012?
28 Feb 2013 by Dave Kreskowiak
You'll have to check with the manufacturer of the library to see if it even supports doing that. Having different compression types in the same ZIP is not part of the specification as far as I know.Why would you even want this??
1 Mar 2013 by Member 9876893
Hello all! I'm in the process of creating a site and looking for an open-source tool that will allow me to incorporate zip-code radius search on the site. Here is an example of what I'm looking for: www.yelp.comWhat I'm trying to do is have my clients/customers type in their zip code to...
3 Mar 2013 by Mike Meinz
This is not Open Source but it is a good source of data to build your own software.Component to get Latitude & Longitude from street addressMap Suite Geocode USA[^]Below are two other sources of data to get Latitude & Longitude. The Zip Code one will not be as accurate for your...
4 Mar 2013 by Kumar_G
Hello FriendsI am VB.NET Programmer and currently working on a project where i have to copy the rar/zip file from any folder.While pasting it, it should extract the rar/zip contents automatically.I am done with my extracting part butHere are some problems i am facingProblem 1 : How...
2 Apr 2013 by Iron-Eagle
I am trying to build a little application using libzip library. I downloaded and compiled libzip with assistance of this article:http://stackoverflow.com/questions/10507893/libzip-with-visual-studio-2010The problem is that it compiles libs dynamically, requiring both zlib.dll and zip.dll...
16 Apr 2013 by babu saravanan
Please refer following linkunzip-in-c-sharp Zip-and-Unzip-from-a-C-program
16 Apr 2013 by Pallavi Waikar
refer this msdn link for helpZipFile Class[^]
16 Apr 2013 by vinayakJJ
How to: Compress and Extract Files[^]
16 Apr 2013 by Thomas Barbare
You can also call an external program with arguments and it will do it for you. Like 7Zip for exemple :System.Diagnostics.Process proc = new System.Diagnostics.Process();proc.StartInfo.FileName = "7za.exe";proc.StartInfo.Arguments = "x " + folder + "\\*.*" + " -o" +...
15 Jul 2013 by Johnny J.
Jar is an archive format sort of like winzip. It is not a physical folder you can just copy files to. You need to extract the files from your zip archive and somehow programmatically add them to your jar archive file.Here's a few links that might be...
6 Sep 2013 by SoraEscape
I want to upload a ZIP which is about 9M in my article. But I can't find the download link in the preview page.How to make sure that my zip upload successfully?
6 Sep 2013 by ridoy
You should post your question on Here[^] to get a proper answer.
19 Jan 2014 by Safak Tarazan
Hi guys,One of the zip file attached to my article is missing now and I dont have a copy of the zip file, is there any way to recover it ? Here is my article linkmy article linkHere is my missing zip link: missing zip link Thanks!
19 Jan 2014 by thatraja
Post your question hereSite Bugs / Suggestions forum[^]And a suggestion : Always keep a copy with you for safety.Check Your Uploads page[^] if that zip file exists
20 Jan 2014 by gonzaloleon
Hi all!I want to know how to Download Zip File From URL with utf8 filenames and foders.Now im doing that with:InputStream input = connection.getInputStream();FileOutputStream output = new FileOutputStream(archivos.PathArchivosApp + "app.zip");byte data[] = new...
21 Mar 2014 by Baxter P
Hi,I have just posted an article and each time the zip file I included is re-downloaded it is corrupted. It was fine earlier before release. I have re-uploaded the file once, it shows 1MB, but when re-downloaded it is 29Kb, and corrupted.Here is the article:C# WPF Dependency...
21 Mar 2014 by OriginalGriff
This isn't really a QA question - it needs to be looked at by the admins. If you post it here:http://www.codeproject.com/Forums/1641/Article-Writing.aspx[^]Or here:http://www.codeproject.com/Forums/1652005/Spam-and-Abuse-Watch.aspx[^]http://www.codeproject.com/suggestions.aspx[^]Then...
21 Mar 2014 by Sergey Alexandrovich Kryukov
Better ask this question here: http://www.codeproject.com/suggestions.aspx[^].—SA
8 Apr 2014 by Abhijit Singha Roy
How can i pick up a set of files or a single file from a ftp folder, zip it, take it to another folder in the ftp, unzip it and store it? The whole process should be on the fly, without storing any files in the local system.Please help.
8 Apr 2014 by Sergey Alexandrovich Kryukov
If you really need it on the fly, you cannot use an available FTP client application, will need to create your own where you can plug-in extra processing. This is not too hard. You can base your code on some available open-source FTP client library, something like this: Simple C# FTP...
17 Apr 2014 by netvan
I opened any download link on codeproject website, but the file can't be download. I am in china,please help me or give me an advise.THX!
17 Apr 2014 by RahulMGunjal
Have you created your account on codeproject? Otherwise it won't allow you to download the file.
17 Apr 2014 by Peter Leow
You should ask your question at Bugs and Suggestions[^]
5 May 2014 by Dhawal Arora
I am trying to read text files from a rar/zip file but unable to do so, I have tried with three approaches but none of them seems to work. First i tried to use the library available from this link http://www.unrarlib.org/download/unrarlib040.exe . It's a code written in 2002 so does not...
18 May 2014 by Manikandan10
The project unrarlib is inactive. Don't use it, use any othe alternatives. Use 7-zip instead as it supports RAR files. Also check whether there is no error in the RAR File. Visit this page:http://www.example-code.com/vcpp/rar_unrar.asp[^]
24 May 2014 by GoogleBoss
Hi guys;I've been trying to come up with a way to build an automated PHP transfer system between 2 servers. Server A : only ftp access; server B : ftp access and can run php scripts.I want to copy all file in server A to a folder in server B;Here is what I am trying to do :1:...
25 May 2014 by NewPast
you could use ZipArchive class please see its doc on php manual
28 May 2014 by ravikhoda
Hi all,i am generating a zip file using sharp zip lib in c# window application. this zip file is password protected. now i want to unzip this file using the mini zip library on ios7 but when i try to extract it using the password it show bad or corrupted file in the ios. however if i...
28 May 2014 by Rob Philpott
This *could* be to do with 64 bit extensions. If it works without password protection then this isn't the problem.It is however a common problem that if you use the latest version of SharpZipLib, Windows XP can't understand the format and claims the file is corrupt. Afraid I don't know...
2 Jun 2014 by Maciej Los
Check online documentation: ZipFile class[^]
2 Jun 2014 by DamithSL
try below Imports Ionic.ZipUsing zip As Ionic.Zip.ZipFile = New Ionic.Zip.ZipFilezip.AddFile("D:\SA\Updates\results\UPDATED_DUMP.xlsx", "")zip.Save("D:\SA\Updates\results\UPDATED_DUMP.zip")End...
23 Jun 2014 by Member 10901708
(((I know that if we use a complicated password for zip files that has more than 8 characters, it's quite safe and can't be cracked easily...For example, for an 8-digits complicated password (containing ABC,abc,123,!@#), it takes 83.5 days for a supercomputer to test all combinations, and 22...
23 Jun 2014 by Sergey Alexandrovich Kryukov
Nothing prevents you from packing other ZIP files in a bigger ZIP file, all encrypted with different passwords. I cannot say how much sense would it make, but it addresses your concern.More serious problem is another one: how would you deliver the passwords themselves? One solution is the...
1 Aug 2014 by Sergey Alexandrovich Kryukov
First of all, the distinction between .EXE and .DLL is not really significant in .NET. The central notion is assembly. These files are only the PE files used as assembly modules. An assembly can have more than one module, but Visual Studio projects usually support only one, which is not a big...
1 Aug 2014 by Abhinav S
To deploy dlls with exe's together, you can create a deployment project that will help you create an automated setup process.TryVideo Tutorial 1[^]Adding a Setup Wizard[^]
4 Aug 2014 by Sergey Alexandrovich Kryukov
dimaba10000 wrote:My original question was, if it was possible to get my executable application to check for .dll files in a specific folder on the users computer, to use that .dll file as a reference. Since I don't want to keep both .dll and .exe in the same folder.You again misunderstood....
8 Oct 2014 by Zoltán Zörgő
Zip has very few self-healing capabilities. You can certainly ask google to look for some tools you can try (like this one: http://www.diskinternals.com/zip-repair/[^]). However, I would not hope for much. You might be able to extract all or some files (if it is not a continuous archive), but a...
16 Feb 2015 by SaadZulfiqar
Hello , i am dynamically creating html and i am creating zipfile like:using(ZipFile file = new ZipFile()){file.AddEntry(''SomeFileName''+'''.html',''This is Saad'');}and than saving the zip file on output stream. Its working fine , zip file download option gets pop up in the...
16 Feb 2015 by Richard Deeming
Include the folder name in the file name parameter:file.AddEntry("myFolder1/myhtml1.html", "This is Saad");It doesn't matter if you use a forward slash (/) or a backslash (\) for the path separator, as the code will fix up the path as necessary. However, to use a backslash...
25 Feb 2015 by Sergey Alexandrovich Kryukov
You can use famous open-source 7-zip which implements different algorithms, including ZIP:http://en.wikipedia.org/wiki/7-Zip[^],http://www.7-zip.org/[^],http://sourceforge.net/projects/sevenzip[^],http://sourceforge.net/projects/sevenzip/files[^].—SA
23 Jul 2015 by quguimin
hello everybody,here I have this question,besides I am a new man in windows program.who can help me extract the big zip file? thanks very much,very much.
8 Oct 2015 by NithyaGopu
Hi All,I have downloaded the file from some website and when I extract these files, it displays the below error.WinZip Self-ExtractorZIP damaged: file : Bad CRC. Possible cause: file transfer error.I have googled the reason for this and it returns the below factors.1.Browser...
8 Oct 2015 by Richard MacCutchan
This is nothing to do with Chrome, but most likely one of the reasons listed. I use Chrome all the time and never have a problem.
2 May 2016 by RamesHPrajapati247
I have used used the jszip JavaScript library to unzip the zip file. I also got the files name in the variable in javascript file but unable to read the file while I wrote the var name.asText(). It gives us encrypted data.What I have tried:I have used the below service to extract and get...
6 Aug 2016 by Member 12296756
Hello! I have this code:Private Sub KickoffExtract() actionStatus.Text = "Se instaleaza actualizarea.. va rugam asteptati." lblProgress.Text = "Se extrage..." Dim args(2) As String args(0) = GetSettingItem("./updUrl.info", "UPDATE_FILENAME") args(1) =...
6 Aug 2016 by Member 12296756
fixed by addingPrivate Sub UnzipComplete(ByVal sender As System.Object, _ByVal e As RunWorkerCompletedEventArgs) If e.Cancelled = True Then MessageBox.Show("Canceled!") ElseIf e.Error IsNot Nothing Then MessageBox.Show("Error: " & e.Error.Message) Else ...
21 Nov 2016 by AlexF185
I'm having a problem downloading zip files from a sub-dir of an ftp site. It works with any other file type even if the sub-dir has spaces.If the sub-dir has no spaces the zip file works fine too.The Exception is "The remote server returned an error: (550) File unavailable (e.g., file...
21 Nov 2016 by Jochen Arndt
This is the response send from the server:Net.FtpWebResponse.StatusDescription = "550 Access is denied."It is pretty clear. You don't have the rights to access the file or directory.If you have direct access to the server, check the permissions there. If not, use a FTP client that can...
1 Feb 2017 by SujataJK
Hello,I am doing web application .Here I want to download bulk of files which are stored in sql server in var-binary format and archive all in zip folder.I already create zip folder from Directory storage as follows...What I have tried: string path =...
1 Feb 2017 by Karthik_Mahalingam
refer this article to save all the pdfs to the disc and then zip the files based on the ZipFile apiSave PDF File in SQL Server Database using C#[^]similar question database to store for PDF,doc,pdf, and Images[^]
4 Jul 2017 by santhosepriya
Hi I am using Zip archive[System.IO.Compression] for collect the multiple xml memory stream and convert into zip memory stream then sent to remote server [where I am storing zip file]. My intention is not to store any files[including xml file,zip file] in local machine, and not to use any 3rd...
4 Jul 2017 by KarstenK
Normally isnt the RAM the problem on the machines, but the disk I/O and so you should optimize the disk read and write operations. It would make sense to make a file I/O thread and a data compression thread, so both operation wont hurt each other performance. The file I/O should only work on one...
25 Sep 2017 by Andy Lanng
Hi, I have a load of images stored in zip files. I am trying to return the image from my Web Api 2 application. Can anyone suggest a clever way to return the stream directly from the zip and then dispose of it (code below)? I'm considering scrapping the 'zip' plan and storing the images as...
30 Apr 2018 by Member 12541933
I need a little help here. I intended to create 2 csv files in PHP and have the browser download them. This will happen when users click a button. However, I discovered that only 1 file download is permitted for each http request. I stumbled upon this stackoverflow post. The solution creates 3...