Batch: During my code loop it stops setting a variable. All Help Welcome

旧时模样 提交于 2019-12-02 05:41:32

Please note, batch does not differentiate between %mm%and %MM%. Try this:

:minutes1
set /a min=0
for /f "tokens=1*delims=0" %%a in ("$0%mm%") do set /a min=%%b 2>nul
echo %min%
if %min% equ 0 goto seconds1

Perhaps you have a fundamental problem with delims=0. If the value is 00 you will get nothing. So you need to quote some variables

if "%HH%"=="6" goto minutes1

and

if "%MM%"=="" set MM=0 & goto seconds1

and add the first line below

if "%SS%"=="" set SS=0
if %SS% lss 10 goto day1
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!