Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Michiel_QV_Fan
Specialist
Specialist

Double quotes and store to

Hi, I want to generate command line list to use in a bat file in.

I defined 5 variables with SET for the fixed text parts of my command line. these will be combined with a variable, created from a list and called one by one with a peek.

I get double quotes in my results when I do not need them.

If I call variable 1: set part1 = 'C:\Program Files (x86)\Advanced XML Converter\exporter.exe';

as '$(part1)' as ....

and store BatFile to BatFile.bat (txt);

I get this result: C:\Program Files (x86)\Advanced XML Converter\exporter.exe

Should be: "C:\Program Files (x86)\Advanced XML Converter\exporter.exe"

If I change part 1 to set part1 = '"C:\Program Files (x86)\Advanced XML Converter\exporter.exe"';

I get this: """C:\Program Files (x86)\Advanced XML Converter\exporter.exe"""

I need to get rid off these extra "".

The table BatFile.bat is generated with Autogenerate(1) for each line.

How to get rid off the extra double quotes?

11 Replies
peter_turner
Partner - Specialist
Partner - Specialist

Hello Michiel,

Yes i believe the problem there is that when you export the table as txt everything gets another set of double quotes, i'm not sure how you'd work around that.

Could you try and run the command from within QlikView instead of a bat file? such as this:

Let vDosCommand = 'CMD /s /c "C:\Program Files (x86)\Advanced XML Converter\exporter.exe"';

EXECUTE $(vDosCommand);

This will cause a dos command window to run with the commands you've set, it will then close when finished and continue the rest of the script.

This is useful as you could insert things like today date into the string or other variables if needed.

Another option could be to run QlikView from a bat file, and pass it some variables to run such as:

"C:\Program Files\QlikView\qv.exe" /r /vMyVariable=31032015 "My_QV_App.qvw"

This will open My_QV_App and set the variable MyVariable with a value of 31032015.

Hope you manage to get a solution working!

gardenierbi
Creator II
Creator II

MichielvandeGoor : Enclose your whole command in another pair of quotes :

EXECUTE CMD.exe /C ""C:\Program Files (x86)\Advanced XML Converter\exporter.exe" Parameter1 Parameter 2";