Bat file to call A.bat if time is less than

April 19, 2010 at 05:14:30
Specs: Windows XP professional Sp 2
Bat file to call A.bat if time is less than 19:45 and to call B.bat if time is greater than 19:45
(i can not use windows task scheduler in this case because i have setting which makes my download manager to trigger this parent bat file each time a file is downloaded through this download manager)

See More: Bat file to call A.bat if time is less than

Report •

#1
April 19, 2010 at 09:20:53
@echo off & setLocal EnableDELAYedeXpansion
if !time! lss 19:45 call a
if !time! gtr 19:45 call b


=====================================
Helping others achieve escape felicity

M2


Report •

#2
April 19, 2010 at 13:47:32
@echo off
set t=%time:~0,5%
set t=%t::=%
if %t% lss 1945 (call :a) else (call :b)
set/p=&exit

:a
echo LSS
goto :eof
:b
echo GEQ
goto :eof


Report •
Related Solutions


Ask Question