Click here to Skip to main content
15,921,452 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
sir
i want to zip a file form my local system .

i want to change the name of the file after unzip it
Posted
Updated 1-Aug-13 0:27am
v3

Try a library like : http://sharpcompress.codeplex.com/[^]
 
Share this answer
 
1. Get DLL for http://dotnetzip.codeplex.com/[^]
2. Add a reference to the DLL.
3. Import the namespace by adding: using Ionic.Zip;

and use the following code

C#
using (ZipFile zip = new ZipFile())
{
    zip.AddFile("C:\test\test.txt");
    zip.AddFile("C:\test\test2.txt");
    zip.Save("C:\output.zip");
}


Hope this helps
 
Share this answer
 
My favorite so far is
Kellerman Software's zip tool[^]. It can unzip whole directories with included files recursively, which saved me some tinkering with those.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900