I have a batch file that needs to be passed a parameter that will include pipes and spaces. Because of the spaces, double quotes need to be attached to the parameter when passing it in. I need to strip off those double quotes and echo the parameter. Normally, using the ~ would let me do this, but I think something about the specific parameters I'm passing in causes a problem. If I do this:
[test1.bat]
call test2.bat "Account|Access Level|Description"
[test2.bat]
echo %1
echo %~1
And run test1.bat, I get this output:
"Account|Access Level|Description"
'Access' is not recognized as an internal or external command, operable program or batch file.
So how do I remove the double quotes and still have a usable variable?