Skip to Content

File to File scenario : Unzip a File using OS command

Hello everyone,

Its a file to file scenario where user is sending ZIP files .

I need to UNZIP it using OS command. Its a SAP 7.11 version with SP 05.

Can anyone suggest how can we unzip the contents using OS command.

Regards,
Ravi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Sep 20, 2013 at 12:35 PM

    Hi Ravi

    First you have to provide your operating system.

    Under windows you can use 7zip software and extract the files easily, under unix you can use a shell script or commands like unzip, gzip....

    And you can use the adapter module PayloadZipBean mentioned above.

    Regards

    Javi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 20, 2013 at 12:24 PM

    Hi Ravi,

    There is a adapter module available for the zip and unzip functionality. Check this link below

    http://help.sap.com/saphelp_nw73/helpdata/en/45/da9358a1772e97e10000000a155369/content.htm

    Hope this helps!

    Abhishek

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 20, 2013 at 01:39 PM

    Hi,

    Refer the below links for the same

    http://scn.sap.com/message/13923250

    http://saptechnical.com/Tutorials/XI/ZippingFiles/demo.htm

    http://scn.sap.com/thread/962966

    For Script refer Ninad sane reply in this thread for OS script.

    http://scn.sap.com/thread/1845624

    Regards

    Bhargava krishna

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2013 at 06:49 PM

    Just to complete the list: if you're trying to use zip in a mobile application then please have a look at:

    http://jsxgraph.uni-bayreuth.de/wp/2009/09/29/jsxcompressor-zlib-compressed-javascript-code/

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 24, 2013 at 04:19 AM

    hi Ravi,

    If its a windows server: Copy the below code to a batch file and execute. Below requires Winzip to be installed/accessible from your machine. Do change variables as per your need.

    you can call the batch file frm your command line argument.

    @ECHO OFF
    SET winzip_path="C:\Program Files\WinZip"
    SET source_path="C:\Test"
    SET output_path="C:\Output\"
    SET log_file="C:\Test\unzip_log.txt"
    SET file_name="*.zip"

    cd %source_path%
    echo Executing for %source_path% > %log_file%

    FOR /f "tokens=*" %%G IN ('dir %file_name% /b') DO (
    echo Processing : %%G
    echo File_Name : %%G >> %log_file%
    %winzip_path%\WINZIP32.EXE -e %%G %output_path%
    )

    PAUSE

    thanks and regards,

    Praveen T

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.