Extracting with subfolders but without parent folders

Viewed 214

I have a zipfile structured like this:

- root
  - subfolder
    - subsubfolder
      - file1
      - file2
    - file3
    - file4

Using 7zip, I would like to extract the archive in such a way, that the resulting structure is:

- subsubfolder
  - file1
  - file2
- file3
- file4

My problem is, that neither 7z e nor 7z x accomplish this. When I use

7z x archive.zip root/subfolder

the structure doesn't change, as the files retain their full paths, and when I use

7z e archive.zip root/subfolder

the files retain no path at all, leaving me with a flat structure an an empty subsubfolder.

Edit: Unzip or any other kind of zip-tool I can use in Linux would also be fine.

0 Answers
Related