Page 1 of 1

If time=N then .. in DosBox for Android?

Posted: Thu Nov 23, 2017 10:09 pm
by Brana
Is there a way for me to triger certain bat file execution according to a specific time of the day?
(Running DosBox for Android).
For example the syntax (something like this one):

If time /t = 13:35 then :load_something
If time /t = 14:35 then :load something_else

But i'm doing it somewhere wrong; it does not work.

Re: If time=N then .. in DosBox for Android?

Posted: Thu Nov 23, 2017 10:59 pm
by iss
You have to use a temporary file to store the output string from the 'time /t' command, than load its content into a variable and then use the variable in IF expression. For more details take look HERE.

Re: If time=N then .. in DosBox for Android?

Posted: Sat Nov 25, 2017 12:47 am
by Brana
First part works;

time /t › temp.txt

That really creates an Txt file Temp.txt whit the hh:mm contest of the file.

But the second part:

set /p var=‹temp.txt

All I got was:
Change enviorment variables

(as I typed for example: "set /?" )