cancel
Showing results for 
Search instead for 
Did you mean: 

Unzip multiple files

Former Member
0 Kudos

Hi,

I have an requirement, where I need to unzip a zip file (Zip file has multiple files) and the unzipped files should be placed in a folder.

I used the "AP_Modules/PayloadZipBean" but it unzips only one file and ignores the rest files by creating a copy of the same first file of the zip.

I cannot use the shell script because of my client restrictions, Is there any other way I can unzip multiple files from a zip file.

Appreciate any solutions for the same.

Regards,

Sainath Chutke

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Sainath,

As you said PayloadZipBean module comes up with some problems when you have several files to unzip. As far as i know the best way to solve this problem is with a progam in your OS, and this program will be called by Pi. If you can't use OS programs the only way that i know is with a java.

Check Praveen Gujjeti's answer in this thread: http://scn.sap.com/message/7289311#7289311

Also you can learn more about unzip in java, although you have to adapt it to PI:

http://www.java-tips.org/java-se-tips/java.util.zip/how-to-extract-file-files-from-a-zip-file-3.html

http://www.devx.com/getHelpOn/10MinuteSolution/20447

http://www.javasqlsecurity.com/2010/11/unzip-multiple-zipped-files-zipinputstream/

Regards.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sainath,

You may try to unzip in mapping.

Please check this blog:

http://scn.sap.com/docs/DOC-26528

Regards,

Beena