How to unzip just a subfolder from the zip without getting the full path to that subfolder

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Is there a way to extract a specific subfolder (without the full path structure) from a zip?



My Zip (A.zip):



A
---B
----C/files


I've tried this until now:



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

unzip A.zip 'A/B/*' -d ~/


without any success. I get the same output as just doing the unzip A.zip -d ~/



I want to have only B/C/files not A/B/C/files as folders.



Extra: I know it exists an -j option, but this just removes the subfolder structure.



Or that I can move them afterwards, but that's not my goal here.



Links: unzip to folder







share|improve this question




















  • You can check this Q/A with IMHO same problem: superuser.com/questions/518347/…
    – Romeo Ninov
    Dec 14 '17 at 8:58










  • so the answer is that it cannot be done directly? (only with the extra function)
    – Edwin
    Dec 14 '17 at 9:54










  • Correct, at least with unzip
    – Romeo Ninov
    Dec 14 '17 at 10:18














up vote
0
down vote

favorite












Is there a way to extract a specific subfolder (without the full path structure) from a zip?



My Zip (A.zip):



A
---B
----C/files


I've tried this until now:



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

unzip A.zip 'A/B/*' -d ~/


without any success. I get the same output as just doing the unzip A.zip -d ~/



I want to have only B/C/files not A/B/C/files as folders.



Extra: I know it exists an -j option, but this just removes the subfolder structure.



Or that I can move them afterwards, but that's not my goal here.



Links: unzip to folder







share|improve this question




















  • You can check this Q/A with IMHO same problem: superuser.com/questions/518347/…
    – Romeo Ninov
    Dec 14 '17 at 8:58










  • so the answer is that it cannot be done directly? (only with the extra function)
    – Edwin
    Dec 14 '17 at 9:54










  • Correct, at least with unzip
    – Romeo Ninov
    Dec 14 '17 at 10:18












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Is there a way to extract a specific subfolder (without the full path structure) from a zip?



My Zip (A.zip):



A
---B
----C/files


I've tried this until now:



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

unzip A.zip 'A/B/*' -d ~/


without any success. I get the same output as just doing the unzip A.zip -d ~/



I want to have only B/C/files not A/B/C/files as folders.



Extra: I know it exists an -j option, but this just removes the subfolder structure.



Or that I can move them afterwards, but that's not my goal here.



Links: unzip to folder







share|improve this question












Is there a way to extract a specific subfolder (without the full path structure) from a zip?



My Zip (A.zip):



A
---B
----C/files


I've tried this until now:



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

unzip A.zip 'A/B/*' -d ~/


without any success. I get the same output as just doing the unzip A.zip -d ~/



I want to have only B/C/files not A/B/C/files as folders.



Extra: I know it exists an -j option, but this just removes the subfolder structure.



Or that I can move them afterwards, but that's not my goal here.



Links: unzip to folder









share|improve this question











share|improve this question




share|improve this question










asked Dec 14 '17 at 8:33









Edwin

1011




1011











  • You can check this Q/A with IMHO same problem: superuser.com/questions/518347/…
    – Romeo Ninov
    Dec 14 '17 at 8:58










  • so the answer is that it cannot be done directly? (only with the extra function)
    – Edwin
    Dec 14 '17 at 9:54










  • Correct, at least with unzip
    – Romeo Ninov
    Dec 14 '17 at 10:18
















  • You can check this Q/A with IMHO same problem: superuser.com/questions/518347/…
    – Romeo Ninov
    Dec 14 '17 at 8:58










  • so the answer is that it cannot be done directly? (only with the extra function)
    – Edwin
    Dec 14 '17 at 9:54










  • Correct, at least with unzip
    – Romeo Ninov
    Dec 14 '17 at 10:18















You can check this Q/A with IMHO same problem: superuser.com/questions/518347/…
– Romeo Ninov
Dec 14 '17 at 8:58




You can check this Q/A with IMHO same problem: superuser.com/questions/518347/…
– Romeo Ninov
Dec 14 '17 at 8:58












so the answer is that it cannot be done directly? (only with the extra function)
– Edwin
Dec 14 '17 at 9:54




so the answer is that it cannot be done directly? (only with the extra function)
– Edwin
Dec 14 '17 at 9:54












Correct, at least with unzip
– Romeo Ninov
Dec 14 '17 at 10:18




Correct, at least with unzip
– Romeo Ninov
Dec 14 '17 at 10:18















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410816%2fhow-to-unzip-just-a-subfolder-from-the-zip-without-getting-the-full-path-to-that%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410816%2fhow-to-unzip-just-a-subfolder-from-the-zip-without-getting-the-full-path-to-that%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay