c# Ionic.zip - how to extract a password protected zip -


how can extract password protected zip using ionic?non password protected zips extracted fine,but password protected ones return exception.

string selected_zip = filelistbox.getitemtext(filelistbox.selecteditem); string targetdirectory = "c:\\users\\aristomenis\\desktop\\" + selected_zip; using (ionic.zip.zipfile zippy = ionic.zip.zipfile.read(targetdirectory)) {     zippy.extractall("c:\\users\\user1\\desktop\\",     ionic.zip.extractexistingfileaction.donotoverwrite); } 

oh, seems zippy.password = "the_correct_password" did trick.

zippy.password = "the_correct_password" zippy.extractall("c:\\users\\user1\\desktop\\",             ionic.zip.extractexistingfileaction.donotoverwrite); 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -