DEVOPS
DEVOPS

Reputation: 18790

How to unzip a file using nant script? Nant unzip task showing some error?

I need to unzip some files using nant script. For that I created a build file.

But it throwing some error like this

Invalid zip file... , Wrong local signature 0X..

my unzip code is like this

<unzip zipfile="${filename}"/>

How can I fix this issue. Any other method is available to do this extration. Please help me.

Thanks

Upvotes: 1

Views: 992

Answers (1)

Adam Bruss
Adam Bruss

Reputation: 1674

Run 7z with the exec task.

<exec program="c:\pathto7zip\7z.exe">
   <arg line="e -oc:\temp\extracted_textfiles textfiles.zip"/>
</exec>

This extracts the files from textfiles.zip into a folder c:\temp\extracted_textfiles.

Upvotes: 3

Related Questions