Batch file: Find if substring is in string (not in a file)

前端 未结 10 2141
深忆病人
深忆病人 2020-11-22 14:14

In a batch file, I have a string abcdefg. I want to check if bcd is in the string.

Unfortunately it seems all of the solutions I\'m find

10条回答
  •  悲哀的现实
    2020-11-22 14:30

    Better answer was here:

    set "i=hello " world"
    set i|find """" >nul && echo contains || echo not_contains
    

提交回复
热议问题