how to get perl to untar a tar.gz to a different directory



Hello

I am running gunzip.exe and tar.exe for DOS...with perl commands,
Gunzip let's me unzip the tar to a different directory as follows:

system("gunzip c:\\temp2\\$filelistarray[$u]");
system("tar -xvf c:\\temp2\\$filelistarray[$u]");

BUT how do I untar AND gunzip out to a different directory ?? If I
cant, what can I do from the command line in DOS ?? WINZIP command
line add on of course doesnt support this capability..I find after
buying..
I realize this is the PERL forum but I figured since I post here a lot
the folks would know this..

Thanks,
Jack

.



Relevant Pages

  • Re: WinZip failure? - dll.z (0/1)
    ... > If somebody could try real Unix on it and let me know what it is and ... Hello Jim, ... The other chance is the "gunzip" command. ... Here is a "gunzip" version for MSDOS in a DOS-box. ...
    (sci.electronics.design)
  • Re: can I replace a string in all Matlab .m files under a folder?
    ... How to write a program in Matlab to change the strings ... the command that follows is to be executed. ... The -i option signals that perl is to edit the ... The -p option signals that the perl commands ...
    (comp.soft-sys.matlab)
  • RE: Gunzip unknown suffix -- ignored
    ... trying the error unknown suffix -- ignored error keeps on popping up. ... The command I am using is without the quotes, "gunzip -v9 file.tar", I ...
    (Fedora)
  • Re: cant open .gz file with winzip
    ... Use gunzip for .gz files. ... Actually there is a port of command line tools: ... To announce that there must be no criticism of the president, ...
    (comp.unix.shell)
  • Re: How to untar .tar.gz when you dont have "-z" option?
    ... > Dave Hinz wrote: ... >> So go into that directory and try to gunzip it. ... What exactly do you _expect_ that command to do? ... You told it to uncompress the file, ...
    (comp.unix.admin)