本帖最后由 ArdentMan 于 2011-7-13 12:41 编辑
- @Echo Off&SetLocal EnableDelayedExpansion
- Rem 两小时倒计时
- For /L %%i In (1,1,50) Do Set "tg=!tg! "
- Set /A h=%Time:~,2%+2,m=%Time:~3,2%,s=%Time:~6,2%
- If %h% GEQ 24 Set /A h-=24
- :Lp
- Set /A hto=h-%Time:~,2%,mto=(1%m%%%100)-(1%Time:~3,2%%%100),sto=(1%s%%%100)-(1%Time:~6,2%%%100)
- If %sto% lEQ 0 set /A sto+=60,mto-=1
- if %mto% lEQ 0 set /A mto+=60,hto-=1
- If %hto% LSS 0 Set /A hto+=24
- Set /P=当前距%h%:%m%:%s%还有%hto%小时%mto%分%sto%秒<Nul
- For /L %%i In (1,1,2000) Do Ver>Nul
- Set /P=%tg%<Nul
- If "%hto%%mto%%sto%" Neq "000" Goto Lp
- Cls&Echo 时间到
- Pause>Nul
复制代码
|