Batch file comparison of variable with constant fails

前端 未结 2 776
长发绾君心
长发绾君心 2020-11-22 02:03

I want to write a simple piece of code to get some nice formated \"time stamp\". Getting the time into my two variables Start and End works fine. A

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 02:29

    if %DiffSec% LSS 10 (ECHO "LESS 10")else IF %DiffSec% LSS 1 (ECHO "LESS 1")
    

    you need an if after the else.

提交回复
热议问题