@echo off :start cls echo Wait how many hours until shutdown? echo (next input is minutes) echo (set 0 to skip hours) set time=Hours Input: call :setvar call :hours echo Wait how many minutes until shutdown? echo (next input is seconds) echo (set 0 to skip minutes) set time=Minutes Input: call :setvar call :minutes echo Wait how many seconds until shutdown? echo (set 0 to skip seconds) set time=Seconds Input: call :setvar call :seconds cls echo Waiting for confirmation echo Set %hs% hours to wait echo Set %ms% minutes to wait echo Set %s% seconds to wait echo. echo Unformatted Hours = %h% echo Unformatted Minutes = %m% echo Unformatted Seconds = %s% echo. choice /n /c:SE /m "Press [S] to start/Press [E] to exit" if %errorlevel% EQU 1 (goto timer) else (exit) :timer cls echo Counting down... echo Waiting for %hs% hours echo Waiting for %ms% minutes echo Waiting for %s% seconds echo. echo Unformatted Hours = %h% echo Unformatted Minutes = %m% echo Unformatted Seconds = %s% echo. echo Press any key to skip, close window to stop if %h% NEQ 0 (timeout %h%) echo Completed or skipped hours if %m% NEQ 0 (timeout %m%) echo Completed or skipped minutes if %s% NEQ 0 (timeout %s%) echo Completed shutdown -s -t 1 exit :setvar set /p a=%time% echo.%a%| findstr /R "[^\/()_a-zA-Z0-9%% $]" >nul 2>&1 if errorlevel 1 (cls) ELSE (goto invalidnum) SET "var="&for /f "delims=0123456789" %%i in ("%a%") do set var=%%i if defined var (goto invalidnum) else (cls) exit /b :invalidnum cls echo You entered an invalid number or included a non number echo Sending you back to the start... pause goto start :hours set /a h=%a%*60*60 set /a hs=%h%/60/60 exit /b :minutes set /a m=%a%*60 set /a ms=%m%/60 exit /b :seconds set /a s=%a% exit /b