I have a problem with extracting a folder within a zip file with its partial path. Is that possible ?
Basically the thing is lets say I have the following zip file:
And I want to extract the directory "temp\" from my zip file in directory "C:\qwerty\"
If I extract it the normal way I would have "C:\qwerty\temp\files\file1.txt".
What I want to achieve is somehow to pass a relative path so that only the files/folders within that path are extracted without the path given. So in other words I would like to have my file extracted in the following way:
I have figure out a solution but in the case above its not working. If I change the name for the item being extracted so that I delete the path in the beginning it is extracted. In the case above I change the name of "temp\files\file1.txt" to "files\file1.txt"
and receive an exception that the item with the same key already exists (which is normal as there is another file with the same path)
Another way to achieve what I am trying is to extract everything in a temp folder and move it where I would like (this seems too complicated for such a small thing).
My question is am I missing something or I should do it the hard way ?