Clarity

Unrar command Linux with gelscript

  • 1.  Unrar command Linux with gelscript

    Posted Jul 11, 2016 05:53 PM

    Hi Guys!

     

    I need you help, please.

     

    I tried execute this command in gelscript:

     

    <core:set value="unrar x /tmp/DLP_11072016/PROP00006977/clarity/Files/918/005/DLP.rar" var="param"/>

    <core:catch var="IOExceptionUnrar">

      <core:invokeStatic className="java.lang.Runtime" method="getRuntime" var="getUnrar"/>

       <core:invoke method="exec" on="${getUnrar}" var="exeUnrar">

      <core:arg type="java.lang.String" value="${param}"/>

      </core:invoke>

      </core:catch>

     

    But, no success.

    There is no exception error and the file .rar is not extract on directory.

     

    Tests: "unrar x..." ,"unrar e ....".

     

    This command is executed successfully on Linux terminal.

     

    Successfully executed commands in gelscript:

     

    1)

    <core:catch var="IOExceptionRemov">

      <core:invokeStatic className="java.lang.Runtime" method="getRuntime" var="getRemov"/>

       <core:invoke method="exec" on="${getRemov}" var="exeRemov">

      <core:arg type="java.lang.String" value="rm ${renomArquivoNovo}"/>

      </core:invoke>

      </core:catch>

    2)

    <core:catch var="IOExceptionZip">

      <core:invokeStatic className="java.lang.Runtime" method="getRuntime" var="getZip"/>

       <core:invoke method="exec" on="${getZip}" var="exeZip">

      <core:arg type="java.lang.String" value="zip -r ${compactarNomeZip} ${compactarFolder}"/>

       </core:invoke>

      </core:catch>

     

    Obs.: Package installed on Linux: UNRAR 5.00 beta 3.

     

    Any ideas?

     

    Thanks!