c# - UnZip files to the previous folder -


i using code extract files using ionic.zip.dll

using(zipfile zip = new zipfile("e:\\hello\\hi\\photos.zip")) {     zip.extractall("e:\\hello\\hi\\", extractexistingfileaction.donotoverwrite); } 

this working fine , extracting : "e:\hello\hi\photos" folder, creating photos folder inside it.

here images in photos.zip folder extract , kept in new folder created "photos"

i want extracted "e:\hello\hi\" not photos folder.

using(zipfile zip = new zipfile("e:\\hello\\hi\\photos.zip")) {     zip.flattenfoldersonextract = true;     zip.extractall("e:\\hello\\hi\\", extractexistingfileaction.donotoverwrite); } 

try this, flattenfoldersonextract ignore possible folders in zip.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -