Reputation: 16029
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
Upvotes: 3
Views: 13636
Reputation: 37589
correct syntax:
set "tempvar="/path/compile" -o source.cpp"
echo %tempvar%
set "tempvar=%tempvar:"=%"
echo %tempvar%
Upvotes: 5