7zip command to extract with full paths (excluding first folder level)

4

1

Using 7zip command line version, I need to extract a .7z file with full paths but excluding the first folder level within the archive.

I thought that this command below would work but it still extracts the "chrome-win32" folder instead of its content.

7z x "chromium.7z"  -o"C:\Apps\1\chromium\"  -ir!"chrome-win32\*"  -y

rejhart

Posted 2013-11-19T16:57:49.913

Reputation: 41

Please do not cross-post to multiple stack-exchange sites.

– Rik – 2013-11-19T17:18:19.983

I believe you're missing \ before *. This way it matches only chrome-win32 folder. Also be avare that * does not match files starting with . – week – 2013-11-19T19:42:32.357

@week: The \ was actually there all along, but Super User wasn’t displaying it. – Scott – 2013-11-19T20:23:12.777

Answers

1

I guess this is cheating, but it would work....

7z x chromium.7z -o"C:\Apps\1\" -y && move "c:\Apps\1\chrome-win32" "c:\Apps\1\chromium"

Mattias Åslund

Posted 2013-11-19T16:57:49.913

Reputation: 1 283