You need to use the original part1, add the additional double quotes around it, and combine with the & symbol to build your query such as
Let vDosCMD=' " ' & 'C:\Program Files (x86)\Advanced XML Converter\exporter.exe' & ' " ' & other strings here
You can then use the EXECUTE $(vDosCMD) or similar to run the command.
This way you can pass parameters to your dos command etc as needed.
In QlikView the result looks ok but in the export .bat (txt) file is get the same result as previous tries:
" ""C:\Program Files (x86)\Advanced XML Converter\exporter.exe"" "
Let vDosCMD=' "' & 'C:\Program Files (x86)\Advanced XML Converter\exporter.exe' & '" ';// & other strings here
'$(vDosCMD)' as [@echo off]
store BatFile into C:\Lokale bestanden\Customer\xml_to_csv\BatFile.bat (txt);
I used your suggestion and created a table build out of all components for the content of the bat file.For test I exported the table as text to notepad, saved as .bat and started if from the command line.
The content works as needed.
Now automate the export with a macro and add the .bat to the Supporting tasks in Publisher.
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"';
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!