Search This Blog

Zip/Unzip folders using C#

Here is  a ready to use zipUnzip.dll
This dll helps you to zip or unzip your folders using C#.net

The zipUnzip.dlll will be available here


Follow the steps to implement it.

1.  Add this .dll to you Application by right clicking your application folder in solution explorer. Below figure demonstrates this procedure.


2. The Add Reference will open following Window.















3. Locate your downloaded zipUnzip.dll and press ok. (my zipUnzip.dll is on desktop so I browzed to desktop).
4. Now you are ready to use this C# .dll in your application.

Example:
For Zip without Password
         FolderZipper.zipUnzip.ZipFiles("f:\\themes","f:\\zipedTheme.zip",null);

For Zip with Password
        FolderZipper.zipUnzip.ZipFiles("f:\\themes","f:\\zipedTheme.zip","*");
here password given is *

For Unzip without password
         FolderZipper.zipUnzip.UnZipFiles("f:\\zipedTheme.zip","f:\\Theme",null,false);
here false = dont delete zip file after unzipping it. if you want to delete than give true.

For Unzip with password
         FolderZipper.zipUnzip.UnZipFiles("f:\\zipedTheme.zip","f:\\Theme","*",false);

 Thats All


539202_Free Ground Shipping 300x250