Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
how to extract a zip file using c# program without using any external dll's?
i need solution for .Net Framework 4.0
Posted
Updated 16-Apr-13 22:42pm
v2
Comments
Try searching in Google first.
[no name] 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.

 
Share this answer
 
refer this msdn link for help
ZipFile Class[^]
 
Share this answer
 
v2
Comments
[no name] 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 17-Apr-13 5:57am    
do u want by using "Microsoft Shell Controls And Automation” reference
Pallavi Waikar 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);

}
fatmarine 13-Feb-15 1:13am    
Hey, you, very good, I was finding this, thanks :)
Member 11311398 30-Mar-15 10:52am    
how to create zip folder in C# 4.0 framework
 
Share this answer
 
v2
You can also call an external program with arguments and it will do it for you. Like 7Zip for exemple :
C#
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[^]
 
Share this answer
 
v2

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