Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

otavio_marco
New Contributor III

How to comprees files (.rar or .zip) with winrar?

Hello everyone!!!

I can call the Winrar to compress (.rar or .zip) my files (most .csv) in qlikview script?

Thanks !

5 Replies
whiteline
Honored Contributor II

Re: How to comprees files (.rar or .zip) with winrar?

Hi

Winrar has a built-in console version.

You can execute whatever you want from the script.

Look for 'exec' command in QV help.

Not applicable

Re: How to comprees files (.rar or .zip) with winrar?

Hi,

Try use Execute

Execute

With the Execute statement it is possible to run other programs during the re-execution of the QlikView

script, e.g. conversions that are necessary.

The syntax is:

execute commandline

where:

commandline is a text that can be interpreted by the operating system as a command line.

Example:

Execute C:\Program Files\Office12\Excel.exe

otavio_marco
New Contributor III

Re: How to comprees files (.rar or .zip) with winrar?

Hello Amanda...

I tried using the command, but it seems that he can not find the file to be compressed.

As I understand it, the EXECUTE simulates an execution in Prompt, then it would be something like this?

LET WinrarFolder = 'C:\Program Files (x86)\WinRAR\WinRAR.exe';

EXECUTE $(WinrarFolder) $(FilesToCompressPath\*.*) a / * parameter WinRAR to compress * / $(DestinationFolder)

Is this correct?

Not applicable

Re: How to comprees files (.rar or .zip) with winrar?

Try

EXECUTE $(WinrarFolder) $(FilesToCompressPath\File)  $(DestinationFolder)

Not applicable

Re: How to comprees files (.rar or .zip) with winrar?

First test your statement in cmd and then use in Qlikview.

You can't debug the syntax of EXECUTE command inside Qlikview.

Community Browser