Annoyances.org
Home » Windows 98 Discussion Forum » Message 1235245155 Search | Help | Home
  
Tip: Run a free scan for common Windows errors ad

Branching in a Batch File based on the Real-Time Clock?
Saturday, February 21, 2009 at 11:39 am
Windows 98 Annoyances Discussion Forum
Posted by gewg_ (3932 messages posted)


Robert Blanda wrote:
|I run a Specials Menu on a large LCD TV at a restaurant using powerpoint.
|There are two specials files (lunch.pps and dinner.pps)
|When this system reboots,
|i want a batch file to determine which powerpoint file to open
|based on what time it is.
|[. . .]
|I figured since you can determine time and date within a batch file,
|can't you do an if /then/else type script within a batch?
|(if its *this time* then load THIS application)
|
Unfortunately, DOS can't do arithmetic from the command line
(not even greater than or less than commands--only equals).
To do what you asked, you would have to include
an IF statement for **every** possible iteration of the RTC.

What you need is a real programming language.
With every OS it shipped, M$ *used* to include a QBASIC interpreter
(a stripped-down version of its QuickBASIC compiler).  No mas.[1] 
cache of http://www.skeeterbytes.com/pc/cabs/981.htm

That's not really a huge deal, however:
http://www.google.com/search?q=Download-QBASIC
...or even
http://www.google.com/search?q=Download-QuickBASIC

Here in the 21st Century, there are many, many options, e.g.:
http://www.thefreecountry.com/compilers/basic.shtml
http://www.google.com/search?q=Python-for-Windows


[1] ...and to get in my usual dig at M$, the big general-purpose GNU/Linux distros
have ALWAYS shipped with GCC (the GNU Compiler Collection).




Written in response to:
Batch File Help? (Robert Blanda: Saturday, February 21, 2009 at 9:25 am)

Responses to this message:
*re: Branching in a Batch File based on the Real-Time Clock? (Robert Blanda: Saturday, February 21, 2009 at 12:46 pm)

All messages in this thread [show all]
-Batch File Help? (Robert Blanda: Sat, Feb 21, 2009, 9:25 am)
-Branching in a Batch File based on the Real-Time Clock? (gewg_: Sat, Feb 21, 2009, 11:39 am)
-re: Branching in a Batch File based on the Real-Time Clock? (Robert Blanda: Sat, Feb 21, 2009, 12:46 pm)
*re: Branching in a Batch File based on the Real-Time Clock? (gewg_: Sat, Feb 21, 2009, 2:50 pm)
-re: Batch File Help? (MartinM: Wed, Feb 25, 2009, 3:00 pm)
*re: Batch File Help? (gewg_: Thu, Feb 26, 2009, 5:33 pm)
-re: Batch File Help? (Bill: Fri, Feb 27, 2009, 2:36 pm)
*re: Batch File Help? (Robert Blanda: Sat, Feb 28, 2009, 10:39 am)
Return to the Windows 98 Discussion Forum


All content at Annoyances.org is Copyright © 1995-2009 Creative Elementtm All rights reserved.
Please do not plagiarize; redistributing these pages without permission is strictly prohibited.