By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!v:\> type dodo.bat
do until datetime %@eval[%_datetime]
echo %_time
delay 1
enddo
echo Done!
do until datetime %@eval[%_datetime+0]
echo %_time
delay 1
enddo
echo Done!
do until datetime %@eval[%_datetime+1]
echo %_time
delay 1
enddo
echo Done!
v:\> dodo.bat
17:39:08
Done!
17:39:09
Done!
17:39:10
17:39:11
17:39:12
17:39:13
17:39:14
17:39:15
17:39:16
^C
v:\>
> And when using a one-token datetime specification involving a variable
> function, the results are unpredictable. Below, the first two loops work
> and the third doesn't!
>
>
> Code:
> ---------
> v:\> type dodo.bat
> do until datetime %@eval[%_datetime]
> echo %_time
> delay 1
> enddo
> echo Done!
>
> do until datetime %@eval[%_datetime+0]
> echo %_time
> delay 1
> enddo
> echo Done!
>
> do until datetime %@eval[%_datetime+1]
> echo %_time
> delay 1
> enddo
> echo Done!
>
> v:\> dodo.bat
> 17:39:08
> Done!
> 17:39:09
> Done!
> 17:39:10
> 17:39:11
> 17:39:12
> 17:39:13
> 17:39:14
> 17:39:15
> 17:39:16
> Did anyone confirm that it's broken?
>
>
> Code:
> ---------
> v:\> type dodo.bat & echo Now: %_date %_time^r^n^r^n & dodo.bat
> do until datetime 2010-06-03 10:46:00
> echo %_time
> delay 1
> enddo
> echo Batchfile done.
>
> Now: 2010-06-03 10:45:50
>
>
> 10:45:50
> Batchfile done.
> ---------
>
>
>
>
Did anyone confirm that it's broken?
Code:v:\> type dodo.bat & echo Now: %_date %_time^r^n^r^n & dodo.bat do until datetime 2010-06-03 10:46:00 echo %_time delay 1 enddo echo Batchfile done. Now: 2010-06-03 10:45:50 10:45:50 Batchfile done.