Page 1 of 1

Unzip the file using Execute Command activity

Posted: Tue Sep 27, 2011 11:47 am
by svga
Hi, I have a requirement where I need to unzip the input file. I used the command "unzip" in Execute Command activity.

eg: unzip /da/st/test.zip

I need all files in the zip to be unzipped in the same directory.. that means in the /da/st/ directory

Can anyone please help me to achieve this?

Thanks a lot for ur help.

Posted: Tue Sep 27, 2011 12:48 pm
by vinothkumar
Try with this
unzip /da/st/test.zip -d

Posted: Tue Sep 27, 2011 3:59 pm
by ray.wurlod
What is "ur help"?

Ur was a city in ancient Babylonia. The second person personal pronoun in English is spelled "you" or, in possessive case, "your".

Re: Unzip the file using Execute Command activity

Posted: Tue Sep 27, 2011 6:34 pm
by chulett
svga wrote:I used the command "unzip" in Execute Command activity.
OK, what happened? If there was an error, what was it?

As noted, the "-d" option specifies an output directory to extract everything to, however it needs to be followed by the desired directory. Otherwise I suspect it unzips it to the current working directory which I again suspect is the original issue.

Two examples, one with and one without the override:

Code: Select all

unzip /da/st/test.zip -d /da/st

cd /da/st && unzip test.zip
Either should work, I would wager.