home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
c
/
clk251.zip
/
CLK.DOC
< prev
next >
Wrap
Text File
|
1993-03-20
|
14KB
|
344 lines
STEENBURGH'S STUFF
Mildly Useful Utilities
For Batch Files
Version 2.51
Copyright 1991-1993 by Chuck Steenburgh and Tay-Jee Software
_______
____|__ | (TM)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Page 1
CLK 2.5 |
Copyright 1991-1993 by Chuck Steenburgh & Tay-Jee Software
DOS offers the TIME and DATE commands which allow to
display, then set, the time and date. Unfortunately,
these commands "hang up" your system in that they prompt
you for a new time and/or date when entered by themselves
on the command line. CLK allows you to display the time
and date and then immediately terminate.
Usage: CLK [/T] [/W] [/M] [/D] [/C] [/Rnn] [/Lnn] [nnn] [/E]|
or CLK "Format" [/C] [/Rnn] [/Lnn] [nnn] [/E] |
/T displays the time in 24-hour
format
/W displays three-letter abbreviation
for the day of the week
/M displays three-letter abbreviation
for the month
/D displays the date
/C centers the displayed string on the
current line.
/Rnn displays string on row nn, where nn is
a number between 0 and 24.
/Lnn displays string starting in column nn,
where nn is a number between 0 and 79.
nnn displays output in color nnn, where nnn
is a number between 0 and 255. See
Appendix 3 for color information.
/E set result to environment variable CLK |
"Format" displays special time elements as part
of a formatted string. Must be enclos-
ed in quotes. See below for details.
Examples: (assuming run at 11:45am Sunday 6 October 1991)
CLK displays the current time and date in
the form: Sun Oct 06 11:45:00 1991
CLK /t displays time: 11:45:00
CLK /w displays day of the week: Sun
CLK /m displays month: Oct
Page 2
CLK /d displays date: 06
CLK /t /m /d /w displays: 11:45:00 Sun Oct 06
CLK /c /w /t displays: 11:45:00 Sun (centered on
current line)
CLK /c /t /r10 79 displays 11:45:00 centered on line 10
in bright white on a red background
CLK "Time: 0" displays: Time: 11:45:00
CLK /t /e displays 11:45:00, sets environment |
variable CLK equal to the string |
"11:45:00" |
Command-line parameters may be entered in any order. Dif-
ferent elements of the date/time, however, will always be dis-
played in the following order: time, day of the week, month,
and date.
The format string combines text with special replaceable
parameters to produce customized output. The text, which
should be enclosed in quotes, can be a message which includes
elements of the time. Use replaceable parameters, prefixed by
the percent () sign, to represent the following data:
a Abbreviated weekday (i.e., Sun, Mon, etc.)
A Full weekday
b Abbreviated month (i.e., Jan, Feb, etc.)
B Full month
0 Day of the month (01-31)
H Hour (24-hour clock 00-23)
I Hour (12-hour clock 00-11)
j Julian date (0-366)
m Month (01-12)
M Minute (00-59)
0000 Meridian (am or pm)
S Second (00-59)
U Week of the year (00-52), Sundays first
W Week of the year (00-52), Mondays first
w Day of the week (0-6), Sunday first
0 Date (MM/DD/YY)
0 Time (HH:MM:SS)
Year (00-99)
Y Year (0000-9999)
Z Timezone
Special note: when using CLK with a custom format string
in a batch file, you must use the double percent sign (%) when
prefixing the special replaceable parameters.
Examples:
Page 3
From the command line:
CLK "The time is now: 0. You have thirty minutes."
produces the string:
The time is now: 11:45:00. You have thirty minutes.
From a batch file:
CLK "Today is %d %B, %Y."
produces the string:
Today is 06 October, 1991.
For additional options in setting elements of the time to an |
environment variable, see the program WHENISIT (also part of |
STEENBURGH's STUFF. |
OMBUDSMAN
This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that
the shareware principle works for you. If you are unable to
resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help. The
ASP Ombudsman can help you resolve a dispute or problem with
Page 4
an ASP member, but does not provide technical support for
members' products. Please write to the ASP Ombudsman at 545
Grover Road, Muskegon, MI 49442 or send a CompuServe message
via CompuServe Mail to ASP Ombudsman, 70007,3536.
DISCLAIMER
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. No warranty, express or implied,
is provided for this software's performance, merchantability,
or fitness for a particular purpose.
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:
- 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
CHKDRV: Checks disk drive status
CHKPRN: Checks parallel printer status
CLK: Displays time on screen
CURSOR: Change cursor shape
DOSVER: Checks for DOS version currently running
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
SPACE: File/disk space reporting utility
WAITFOR: Timed pauses
WHENISIT: Date/time telling utility
WRITE: Colorful output anywhere on screen
XD: Create/switch directories at the same time
You may evaluate these programs for up to 30 days on a free
trial basis. After 30 days, you should register your use of
Page 5
these programs. The registration fee is $20, payable to the
author at the address given below. For those registering
directly with Tay-Jee Software, we offer a $5 cash discount.
Let's be real: I don't plan to make a lot 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.
You will also get the next major release of the program set
sent to you 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 make 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-
ument), and any other electronic creations I have decided
to unleash on a foolish, unsuspecting world.
Send comments/registrations to:
Tay-Jee Software
Post Office Box 835
Lexington, VA 24450
(703)464-5290
!!!VIRGINIA RESIDENTS ADD 4.5SALES TAX!!!
CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
Page 6