.batch help

FirefighterKyle

I am Kyle!!
Sep 14, 2012
162
7
Hello I am trying to make my .bat file read off the following hours, mins and seconds in the correct term like so hours 24 = 1 day mins = 60 and sec = 60 this is the code I have and been trying to work with
Code:
@echo off
                  title Server Restarter
           :start
                  set time=36000
                  start notepad.exe
           :loop
                  cls
                  IF %time% GTR 0 (
                   set /a time=%time% - 1
                   set /a sec=%time%/
                    set /a min=%time:~1%/600
                    set /a hr=%time:~1%/10
                     echo <> will Restart In %time% Seconds.
                    echo <> will Restart in %time% Seconds Which is %min% Minutes Which is %hr% Hours.
                   ping 127.0.0.1 -n 2 > NUL
                  goto loop
                  )
           taskkill /f /im notepad.exe
          cls
         close server
         goto start
 

Users who are viewing this thread

Top