Batch not-equal (inequality) operator

前端 未结 5 706
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-22 21:25

According to this, !==! is the not-equal string operator. Trying it, I get:

C:\\> if \"asdf\" !==! \"fdas\" echo asdf
!==! was unexpected at          


        
5条回答
  •  旧巷少年郎
    2020-12-22 21:59

    Try:

    if not "asdf" == "fdas" echo asdf
    

    That works for me on Windows XP (I get the same error as you for the code you posted).

提交回复
热议问题