Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ZIP
how to extract a zip file using c# program without using any external dll's?
i need solution for .Net Framework 4.0
Posted 16-Apr-13 22:09pm
Edited 16-Apr-13 23:42pm
v2
Comments
Tadit Dash at 17-Apr-13 3:21am
   
Try searching in Google first.
suresh jaladi at 17-Apr-13 4:40am
   
after searching only i have posted this question, i need a solution for .Net Framework 4.0 wihtout using any third party assemblies.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please refer following link
 

unzip-in-c-sharp
 
Zip-and-Unzip-from-a-C-program
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

refer this msdn link for help
ZipFile Class[^]
  Permalink  
v2
Comments
suresh jaladi at 17-Apr-13 4:26am
   
it is supported in .Net Framework 4.5, but i need a solution with .Net Framework 4.0
Pallavi Waikar at 17-Apr-13 5:57am
   
do u want by using "Microsoft Shell Controls And Automation” reference
Pallavi Waikar at 18-Apr-13 4:00am
   
click on project add "Microsoft Shell Controls And Automation” reference from com in ur project then do following code..
 
using Shell32;
private void btnUnzip_Click(object sender, EventArgs e)
{
Shell Sh = new Shell();
Folder SF = Sh.NameSpace(@"D:\gzipDemo\abcd.zip");
Folder DF = Sh.NameSpace(@"D:\gzipDemo");
foreach (FolderItem F in SF.Items()) DF.CopyHere(F, 0);

}
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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" + folder;
proc.Start();
 
Command list and exemple for 7z :7-Zip Command-Line[^]
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 370
1 Sergey Alexandrovich Kryukov 329
2 BillWoodruff 235
3 Afzaal Ahmad Zeeshan 209
4 CPallini 195
0 OriginalGriff 5,560
1 DamithSL 4,476
2 Maciej Los 3,942
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 17 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100