views:

1160

answers:

2

PROBLEM: I would like to be able to extract tar.gz files in a single step. This makes my question almost identical to this one: stackoverflow question for tar-gz.

My question is almost the same, but not the same, because I would like to do this on windows using 7zip command-line (or something similar) inside a bat file or ruby/perl/python script.

QUESTION: This seemingly simple task is proving to be more involved than the first appearance would make it out to be. Does anyone have a script that does this already?

+1  A: 

Use the win32 port of tar.

tar -xvfz filename.tar.gz
Byron Whitlock
+2  A: 
7z e example.tar.gz  && 7z x example.tar

Use && to combine two commands in one step. Use 7zip portable (you will need 7z.exe and 7z.dll only)

Pacifika