0

GitHub zip files normally contain a single directory in the zip. I want to unzip the contents of a zipped directory to a different directory as shown in Linux answer at: How to extract only a specific folder from a zipped archive to a given directory?

eg unzip <target-zip-file> '<folder-to-extract/*>' -d <destination-path>

The command still extracts files to destination-path\folder-to-extract. How do I extract without creating folder-to-extract?

(The -j modifier discards all directories.)

2
  • Do you want to use 7ZIP? that's open-source. Then here is the command: 7z x -o"folder-path" "archive-file-name".
    – Biswapriyo
    Jun 18, 2018 at 7:21
  • @Biswapriyo x will restore the folder tree stored in the zip underneath the given -o folder . Provided it is a flat dir to restore I suggest using e : ` e : Extract files from archive (without using directory names)`
    – LotPings
    Jun 18, 2018 at 8:38

0

You must log in to answer this question.

Browse other questions tagged .