Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
If it's so similar to that question, doesn't this belong on Stack Overflow? –  jtbandes Aug 31 '09 at 23:06
    
I already asked there, but someone on stackoverflow voted to move it here, so i asked here in case it got erased. There's always the "grey area" questions that could be on both sites, this seems like one of them. –  dreftymac Sep 1 '09 at 0:05

3 Answers 3

up vote 1 down vote accepted

Perhaps the GnuWin32 ports of gzip and tar are what you need (scroll down)

share|improve this answer

Maybe try something like adding a temporary .tgz extension?

MOVE %1 %1.tgz
7z x %1.tgz
MOVE %1.tgz %1

I might be wrong, but I believe 7zip will unzip tgz files all at once (instead of with tar.gz files).

share|improve this answer

Try the tartool utility http://tartool.codeplex.com/

I was frustrated by the lack of a cmd line utility for such a simple task and created it for this exact reason.

The code is open source and uses SharpZipLib library.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.