PDA

View Full Version : Problem using literal percent


rnauman
05-12-2015, 10:17 AM
I have a batch file task setup to run an executable that accepts a URL as a parameter. I'm now trying to update the url to include %20 but am having problems.

My command:

"%RepositoryPath%\Dependencies\PhantomJS\phantomjs. exe" --ignore-ssl-errors=true "vendor\qunit\runner.js" "https://example.com/runner.aspx?jqv=%jqueryVersion%&distro=%LOOP_VALUE%&module=codebooks%%20history" %qunitTimeout% >> "%BuildPath%\qunit.txt"

Transformed into:

"D:\Build\repository\Dependencies\PhantomJS\phantom js.exe" --ignore-ssl-errors=true "vendor\qunit\runner.js" "https://example.com/runner.aspx?jqv=1.9.1&distro=nojqd&module=codebooks0history"

Have I overlooked a syntax nuance?

kinook
05-12-2015, 06:31 PM
The percent sign will need to be escaped once for Visual Build (%%) and again for the batch file (%%%%).

http://www.kinook.com/VisBuildPro/Manual/specialchars.htm

http://www.robvanderwoude.com/escapechars.php