Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ift_isabelle
Partner - Creator III
Partner - Creator III

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

5 Replies
petter
Partner - Champion III
Partner - Champion III

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
Partner - Creator III
Partner - Creator III
Author

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.


petter
Partner - Champion III
Partner - Champion III

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

ift_isabelle
Partner - Creator III
Partner - Creator III
Author

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

SimonAichmayr
Partner - Contributor
Partner - Contributor

Hi guys,

 

I´ve the same problem like isabelle. Is there any sollution founded? @petter I have selected the C-Drive from my server and created a connector.

 

Best regards.

pl1.PNGpl2.PNGpl3.PNG