gzip.exe - How to Run On Windows XP ?

Even though I'm running WinXP pro sp-1, the issue is with a unix utility with which the XP folks seem to be unfamiliar.  That's why I'm posting here.  I'm decompressing files with .tar.gz extension using GNU gzip.exe.
In Folder Options -> File Types, I've registered .gz to run a batch file called gzip.bat which calls 'gzip.exe -d %1'  But, when I double click the file I want to decompress all this does is eliminate the .gz leaving the .tar extension.  

How do I run this so the original .tar.gz keeps it's full extension and the files are unzipped in the temp directory (or prompt for directory name)?  Thank you.
Jerry LAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

A something.tar.gz is a tar archive that's been compressed with gzip. To unpack the files on a windows box you need both the decompression tool and a tool to read the tar archive. What you have now is only the decompression tool and it is operating correctly and decompressing the file. To then unpack the something.tar file that 'gzip -d' you need a tar.exe for windows.

There are other tools for windows that can do all of this in one set.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

   WinZip can unpack tar.gz to a directory you choose. You don't need gzip.exe.

Winzip does the trick, so does Winrar which supports more formats...
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jerry LAuthor Commented:
Winzip and WinRAR have been losing files and folders when extracting the tar.gz's which happen to be over 15MB.  I've used these utils multiple times and always the same files are missing (different files for each app, RAR loses more than winzip so at first I thought winzip was working, but it loses files too).  I have not had these problems when I use gzip -d filename.tar.gz followed by Alladin's Stuffit (I'm not sure I want to spend the $40 on registered version just yet).  I just found my 'tar.exe' which I forgot I already had, so I'm going to try that.

Since I don't recall how to modify filenames in the batch file (anyone?),  I tried the following, GZ.bat,
   copy %1 %1.bak
  \bin\gzip -d %1 | tar -x

This should send the output file that gzip creates over to the input for tar.  But, I never see the output from tar.  (The 'pause' is just to see the results before the cmd window closes.)  I'd like to keep the script native to Windows rather than write a perl script.  More points for help with this. (I'll split with jlevie) Thanks.
   How about cygwin? It's Unix-like envirnment in Windows. It collects all the GNU tools for Windows. Check it out.

   I try to use "tar" in cygwin, it can uncompress tar.gz within one shot:
# tar zxvf *.tar.gz  (or *.tgz)

Jerry LAuthor Commented:
Looks good.  Thanks for the tip.
7Zip is like winzip but free.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.