I'd like to pass a variable with multiple spaces to a batch script, but it removes multiple spaces and replaces it with one.
C:\user\bat\myscript.bat var1 var2 "'var3'" "'some text followed by double blank__some more text'"
__ are to show the two blanks (' ', spaces, not underscore)
I already tried with %~4
, %4
etc. but it always removes the double blanks.
br, Manuel
The bat script is called from a Java application which gets the whole call string from a database.
Script call:
C:\user\bat\eqkvard.bat C:\user\reports\eqkvard.rdf C:\user\output\kontrollvarianten\myoutput.pdf "''"
"'00.101 D-Bereiche LKZ + OKZ(blank)(blank)L52 Gbd.151 -Mediafill'"
The site does not show both blanks. The syntax for the quotes is the following: (")(')text(")
Script itself:
START "myprogram" /MIN rwrun report=%1 userid=user/pw@myDB desformat=pdf destype=file desname=%2 p_1=%3 p_2=%4
The script calls the Oracle reports runtime with the parameters. Hope this can help.