With the SharpZip lib I can easily extract a file from a zip archive:
FastZip fz = new FastZip();
string path = "C:/bla.zip";
fz.ExtractZip(bla,"C:/Unzips/",".*");
However this puts the uncompressed folder in the output directory.
Suppose there is a foo.txt file within bla.zip which I want. Is there an easy way to just extract that and place it in the output directory (without the folder)?
The
FastZipdoes not seem to provide a way to change folders, but the “manual” way of doing supports this.If you take a look at their example:
As they note, instead of writing:
you can write:
to remove the folders.