Click here to Skip to main content
15,906,766 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i zip my pictures folder
Posted

1 solution

Hi, you can simplify your life and use third-party librarry called DotNetZip

After you download it and your project will be referenced to it , write the following lines of code :

C#
using (var zip = new Ionic.Zip.ZipFile())
{
    zip.AddDirectory("DirectoryOnDisk", "rootInZipFile");
    zip.Save("MyFile.zip");
}
 
Share this answer
 
v2
Comments
Dhritirao's 27-Dec-12 6:08am    
i m unable to understand in that what should i download i m not getting anything
Oleksandr Kulchytskyi 27-Dec-12 6:09am    
Ho to the link , i provided you with it , then download assembly from codeplex,
and add this assembly (reference to it) in you VS project
Dhritirao's 27-Dec-12 11:32am    
sorry first i dnt understood but i tried it. its working thanks for ur help.
Oleksandr Kulchytskyi 27-Dec-12 11:33am    
You are welcome, contact me if any ;)

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