3

I have an issue in batch programming. I fetch the strings generated by consoles, then the string contains double quotes and I will save that to a variable, like,

"/path/compile" -o source.cpp

And now my problem is, how can I remove this 2 double quotes? I'm not sure how to remove that quotes in the middle of the string.

Please advise

2

2 Answers 2

9
set a="hello" world
set b=%a:"=%
0
5

correct syntax:

set "tempvar="/path/compile" -o source.cpp"
echo %tempvar%
set "tempvar=%tempvar:"=%"
echo %tempvar%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.