Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

ift_isabelle
Contributor II

Execute Command

Hi,

We are trying to create and execute a bat file from the script.

I already disabled the standard mode and added these two lines in the settings.ini:

OverrideScriptSecurity=1

AllowExecuteCommand=1

My qlik service user has rights to go to the location and to do things there.

In Qlik Sense the message is that de execute command is being executed, but it doesn't do anything.

The commands i'm using are:

let vFile = peek('File',$(j),'FilesToLoad');

LET vImportPath = '\\Server\map\IN\';

LET vExportPath = '\\Server\map\Archief\';

LET vMoveFile = 'move ' & chr(34)& vImportPath & vFile & chr(34) & ' ' & chr(34) &  vExportPath & vFile& chr(34);

execute cmd.exe /c echo $(vMoveFile) > "E:\1. Qlik PROD\0. Data\4. Support files\2. Batch bestanden\Batchbestanden\sales.bat";

EXECUTE    cmd.exe /C "E:\1. Qlik PROD\0. Data\4. Support files\2. Batch bestanden\Batchbestanden\sales.bat";

Anyone any idea what is going wrong?

Thanks in advance,

Isabelle

Tags (2)
4 Replies
MVP
MVP

Re: Execute Command

Have you checked whether the sales.bat file gets created?

If it does - have you checked the content of it?

If the content looks OK have you tried to run it manually?

ift_isabelle
Contributor II

Re: Execute Command

The script doesn’t create the bat file.


But, annoying part, in Qlik view the script and bat-files work perfectly. So i guess i’m missing a setting or something in Sense.


MVP
MVP

Re: Execute Command

And I guess the E-drive is a local drive for the server not a mapped network drive - right?

ift_isabelle
Contributor II

Re: Execute Command

Yes it is a local drive and i have full admin right on it.