Dec 122017
Control DOS batch files based on time and date.

Full Description of File

WHENISIT, v.1.1 -- Provide control in DOS
batch files based on time & date. Allows
batch files to determine year/date/day/time
in order to make intelligent decisions based
on this info.

File WHEN11.ZIP from The Programmer’s Corner in
Category Batch Files
Control DOS batch files based on time and date.
File Name File Size Zip Size Zip Type
FILE_ID.DIZ 193 147 deflated
REGISTER.FRM 926 429 deflated
WHATS.NEW 206 161 deflated
WHENISIT.DOC 9124 2828 deflated
WHENISIT.EXE 11584 7392 deflated

Download File WHEN11.ZIP Here

Contents of the WHENISIT.DOC file

A Batch File Utility to Tell Time
Copyright 1991,1992 by Chuck Steenburgh |

WHENISIT is a highly flexible utility to provide control in
DOS batch files based on time and date. With its many op-
tions, WHENISIT will allow your batch files to determine the
year, month, date, day of the week, hour, minute, second, or
whether it is morning or afternoon and make intelligent de-
cisions based on this information. WHENISIT is also able to |
perform actions once a day (such as at the first boot-up of the |
day). |

For example, you may want certain actions performed at
boot time on certain days of the week or month. Adding
WHENISIT to your AUTOEXEC.BAT file can allow you to make
these sort of decisons. (Or allow your computer to make them
for you automatically.)


WHENISIT [option]

where [option] is one of the following:

/? Displays help screen |

/a Returns errorlevel based on am or pm

/d Returns errorlevel equal to date

/h Returns errorlevel equal to the hour
(24-hour clock)

/m Returns errorlevel equal to month

/mi Returns errorlevel equal to minute

/s Returns errorlevel equal to second

/w Returns errorlevel based on the day
of the week

/y Returns errorlevel equal to the last
two digits of the year.

Entering WHENISIT alone on the command line will generate an |
errorlevel of 1 if WHENISIT has not been executed yet that day. |
Otherwise, an errorlevel of 0 will be returned. Note that if |
you maintain multiple copies of WHENISIT.EXE on your system, |
each copy of WHENISIT will keep track of whether or not it has |
run separately from any other copies. Be sure you know which |
copy you are executing! This is useful to put in AUTOEXEC.BAT |

Page 1

to indicate actions you want performed only ONCE each day, no |
matter how many times you re-boot your computer. (Once-a-day |
mode) |


WHENISIT /a Returns errorlevel of 2 if it is pm,
or 1 if it is am.

WHENISIT /y If your clock is set to the year
1991, returns an errorlevel of 91.

WHENISIT /w If your clock indicates that it is
Tuesday, returns an errorlevel of 3.

WHENISIT Returns errorlevel of 0 if WHENISIT |
has already executed, 1 if not. |

Errorlevel Chart:

Errorlevel Switch: /a /m /d
---------- --------------------------------------
1 AM January Sunday
2 PM February Monday
3 na March Tuesday
4 na April Wednesday
5 na May Thursday
6 na June Friday
7 na July Saturday
8 na August na
9 na September na
10 na October na
11 na November na
12 na December na

The errorlevels returned through the use of other switches
should be self-explanatory. If an error occurs, the an error-
level of 0 will be returned.


The programs described in this documentation are guaran-
teed to do absolutely nothing! They have, however, in my exper-
ience performed essentially as described herein. The author
will not be responsible for any loss or damages caused through
the use of these programs.

All trademarks are property of their respective owners.

The programs and documentation are Copyright 1991,1992 by
Chuck Steenburgh. You are encouraged to distribute these pro-
grams provided the following conditions are met:

Page 2

- all files contained in the archive or distribution disk
must be distributed together in UNMODIFIED form

- you charge no more than a reasonable fee for copying or
subscription, and clearly indicate that payment of such
a fee does NOT grant ownership of the programs.

This program is part of set of utilities known as STEEN-
BURGH'S STUFF (Mildly Useful Utilities). The full set of
utilities includes the following programs:

BATBOX: Simple menu creation/input system
CLK: Displays time on screen
DOSVER: Checks for DOS version currently running
FREEDISK: Checks for available disk space
HOWMUCH: Displays space occupied by a group of files
INPUT: Simple prompt/input system
KLS: Colorful screen-clearing utility
LAUNCHER: File selection/execution system
MUSIC: Plays transcribed sheet music on the PC
RAND: Random number generator
SKIP: Prints blank lines from batch files
SOUNDER: Wide range of noise making options
WAITFOR: Timed pauses
WHENISIT: Date/time telling utility
WRITE: Colorful output anywhere on screen
XD: Create/switch directories at the same time

Payment of the $10 registration fee automatically registers
you for the full set.

You may evaluate these programs for up to 30 days on a free
trial basis. After 30 days, you should register your use of
these programs. The registration fee is $10, payable to the
author at the address given below.

Let's be real: I don't plan to make alot of money this way.
Registration does have its advantages:

- I am improving these programs all the time. Registration
will get you IMMEDIATELY a disk with the latest version,
which includes a version of BATBOX with user-selected
menu colors. When Version 2.0 of these utilities is re-
leased, you will also receive that free of charge.

- While I can't promise to include everyone's suggestions
in program updates, you can bet I'll listen to registered
users before any of you scrounges out there.

- You will me feel all warm and fuzzy and appreciated, and
all that good stuff.

- You will also get an evaluation copy of my text-file for-
matting program (used to produce the margins in this doc-

Page 3


Send comments/registrations to:

Chuck Steenburgh
304A North Main Street
Lexington, VA 24450

CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)

Page 4

 December 12, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>