Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unzipping a file 1

Status
Not open for further replies.

dpk136

MIS
Jan 15, 2004
335
US
I need to be able to have the user upload a zip file, then i unzip that file because they will be uploading 100K files. I'd really like to stay away from installing anything else, so does anyone know of anything out there that is all sourcecode?

David Kuhn
------------------
 
This looks like the ticket:
I haven't used it yet, but it looks pretty simple. I will be trying it out too, let me know how it works.

Alex

[small]----signature below----[/small]
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom
 
Did you read the documentation?

It sounds to me like all you need to do is incorporate the library in your project and add a reference. I will try it out later today.

Alex

[small]----signature below----[/small]
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom
 
dpk136 - All you need to do is bring the appropriate .dll into your project and add a reference to it.

Unzipping a file is as simple as this:

Code:
private void button1_Click(object sender, EventArgs e)
{
     ICSharpCode.SharpZipLib.Zip.FastZip fZ = new ICSharpCode.SharpZipLib.Zip.FastZip();
     fZ.ExtractZip("C:\\TestZip.zip", "C:\\", ".XML");  //use "" for File Filter if you want all files
     fZ = null;
}

Hope this helps,

Alex

[small]----signature below----[/small]
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom
 
hmmmm...Alex, what did you have to do for this.. i can't find any DLLs. (you don't have to register this do you?)

David Kuhn
------------------
 
No, no registration. Which package did you download, the one with C# source code or the one with the binaries?

The one with the binaries was called SharpZipLib_0852_BinDoc.zip

There are four dll's, the one with teh path current\net-20 is what I used (I am on 2.0 framework).

I guess if you unzip the file then the folder structure is more easily navigated now that I look at this again ;-)

Hope this helps,

Alex

[small]----signature below----[/small]
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top