-3
如何让我的命令/批处理文件显示更好的时间表?服务器重新启动器时间轴,秒钟时间
@echo off
title Server Restarter
:start
set time=18000
start (exefile).exe
:loop
cls
IF %time% GTR 0 (
set /a time=%time% - 1
set /a min=%time%/5
set /a hrs=%time%/10
echo (servername) will Restart In %time% Seconds.
echo (servername) will Restart in %time% Seconds, %min% Minutes, %hrs% Hours.
ping 127.0.0.1 -n 2 > NUL
goto loop
)
taskkill /f /im (exefile).exe
cls
close server
goto start
有没有一种方法,使代码显示这个样子,
分钟0-59秒0-59小时0-24天0-(数量)
等?我尝试了很多东西,但无法获得正确显示的时间。
哦好吧,谢谢你这么多斯蒂芬。 – GrimmRP