W
winter
I was just wondering whether there is a *more elegant* way to adjust
the time by 1 minute using batch? I know I could use soon/rsoon (in
this case) but I wanted something portable.
@echo off
setlocal
time /t > %temp%\time
for /f "delims=: tokens=1,2" %%a in (%temp%\time) do (set t1=%%a &set
b=%%b)
echo %b% | find "PM" & if not errorlevel = 1 (set /a
t1="%t1:~0,2%+12") else (set /a t1=%t1:~0,2%)
set /a t2="%b:~0,2%+1"
::at "%t1%:%t2%" %1%
thx
the time by 1 minute using batch? I know I could use soon/rsoon (in
this case) but I wanted something portable.
@echo off
setlocal
time /t > %temp%\time
for /f "delims=: tokens=1,2" %%a in (%temp%\time) do (set t1=%%a &set
b=%%b)
echo %b% | find "PM" & if not errorlevel = 1 (set /a
t1="%t1:~0,2%+12") else (set /a t1=%t1:~0,2%)
set /a t2="%b:~0,2%+1"
::at "%t1%:%t2%" %1%
thx