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.
Unzip the file using Execute Command activity
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 342
- Joined: Tue Nov 04, 2008 10:38 am
- Location: Chennai, India
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Unzip the file using Execute Command activity
OK, what happened? If there was an error, what was it?svga wrote:I used the command "unzip" in Execute Command activity.
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
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers