Removing double quotes from variables in batch file creates problems with CMD environment

前端 未结 11 578
春和景丽
春和景丽 2020-12-04 11:25

Can anybody help with effective and safe way of removing quotes from batch variables?

I have written a batch file which successfully imports a list of parameters %1,

11条回答
  •  不思量自难忘°
    2020-12-04 11:59

    I usually just remove all quotes from my variables with:

    set var=%var:"=%
    

    And then apply them again wherever I need them e.g.:

    echo "%var%"
    

提交回复
热议问题