Hi to All
I need sample coding to unzip a password protected zip files for my project..
I know the password.. but now i have to give password for each zip file n extract separately.. password is same for all files.. so once if i give password through coding it will be easy for me..
Its very urgent..
Can anybody help for me?
With regards,
ila
How to unzip a password protected zip files
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Lalit MRank #1,186 · 1.5K reputationPosted Mar 19, 2010, 3:16 AM EDT
show here code sample try it,
private void button18_Click(object sender, System.EventArgs e) { Chilkat.Zip zip = new Chilkat.Zip(); zip.UnlockComponent("Anything for 30-day trial"); // To open a password-protected zip, set the password // prior to opening the Zip. zip.SetPassword("test"); // This test file has been uploaded to: // http://www.example-code.com/testData/passwordProtected.zip bool success = zip.OpenZip("passwordProtected.zip"); if (!success) { MessageBox.Show(zip.LastErrorText); return; } // Unzip into a relative subdirectory, which is created // if it does not yet exist: int numFilesUnzipped = zip.Unzip("myUnzipDir"); if (numFilesUnzipped == -1) { MessageBox.Show(zip.LastErrorText); } }