当前位置:网站首页>String comparison in batch file - string comparison in batch file

String comparison in batch file - string comparison in batch file

2022-07-07 00:38:00 Superior virtue and weak water

problem :

How do we compare strings which got space and special chars in batch file? How do we compare strings with spaces and special characters in batch files ?

I am trying: I'm trying :

if %DevEnvDir% == "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\"(echo VS2010)

But it gives an error "Files was unexpected at this time." But it gives an error “ The document was unexpected at this time .”

I tried: I tried :

if "%DevEnvDir%" == "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\"(echo VS2010)

But it gives an error "The syntax of the command is incorrect." But it gives an error “ The syntax of the command is incorrect ”.

Any ideas? Do you have any ideas ?


Solution :

Reference resources : https://stackoom.com/en/question/10kHv
原网站

版权声明
本文为[Superior virtue and weak water]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130952048695.html