I need a batch script which, when run twice, create empty xxx.txt
Time between first and second start script is max 10 seconds.
I know how to...
...first batch start ... to create txt file with current time
...second batch start ... create xxx.txt file
@echo off
IF EXIST a.txt goto skip
) ELSE (
echo %time% > a.txt
EXIT
:skip
echo > xxx.txt
EXIT
I don't know how to compare time in a.txt with current time, and if difference less then 10 sec, that create xxx.txt, and if not that del a.txt
format time in a.txt: 21:53:10,13
BATCH compare or difference in time
Moderator: DosItHelp