Dec 172017
Batch file utility that returns Day of Week, Month, etc. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
WDAY.DOC | 6045 | 2143 | deflated |
WDAY.EXE | 23444 | 16019 | deflated |
Download File WDAY12R.ZIP Here
Contents of the WDAY.DOC file
WDAY - What Day Is It?
Copyright 1991 by TRIAC Systems, ALL RIGHTS RESERVED
Freeware Program
by
Robert White
TRIAC Systems
925 Penny Lane
Marietta, Georgia 30067-4414
CIS : 72040,730
ILink : Shareware Conference
RIME : Shareware Conference
PNet : BBSUtils Conference
Documentation for Release Level 1.2 of 06/01/1991
INTRODUCTION
============
This program was written to provide a simple means for providing a
"timing" capability for DOS BATCH files.
When WDAY.EXE is used, you can test the DOS ERRORLEVELs in your batch
file to see (for instance) if it is after 3:00pm, in the month of April,
on a Tuesday.
This means that if you need a certain event to occur only after a
certain day, hour, minute, ect., that you can set up a batch file to
check for you.
Now, while I realize that there is *MUCH* better software out there
available to do just this, this program is still useful. For instance -
if you are a SysOp of a Bulletin Board System, then perhaps you need to
make sure that only certain door games can run after 6pm. Unless your
BBS software will allow you to define operation time restrictions for
each door, you have no way to regulate what a user can get into at
specific times.
By using the features of WDAY, you can place ERRORLEVEL checks within
the batch files that most BBSs use to start a door, and exit gracefully if
it is not after 6pm.
This means that you do not have to have a TSR, Device Driver, or other
memory hogging program, to catch the time for events that may or may not
occur regularly.
Page 1
OPERATION INSTRUCTIONS
======================
Program Useage :
From the DOS command line (example: C:\>_ ) :
WDAY
where are :
======================== ======================
Time based : /h = Hour (0-23)
/i = Minute (0-59)
Date : /m = Month (1-12)
/d = Day (1-31)
/r = Year (0-99) (Last 2 digits)
/w = Weekday # {default} (1-7) 1=Sun,2=Mon...7=Sat
Other: /? = Help
? = Help
Page 2
BATCH FILE INSTRUCTIONS
=======================
When using WDAY within a BATCH file, the only extra thing you
must do is to perform the BATCH file ERRORLEVEL test. Please
review the following sample BATCH file if you are not familiar
with ERRORLEVEL.
Example :
@echo off
f:
cd \pcb\doors\game1
WDAY /h
if ERRORLEVEL 17 goto OKGO
if ERRORLEVEL 8 goto NOGO
:OKGO
rem *** place your game door execute code here ***
goto ENDGAME
:NOGO
rem *** place the actions to do if between 8am and 5pm here ***
:ENDGAME
rem *** place code to return to your system here ***
Discussion/Explanations of above example :
WDAY /h
Well this line is the command which executes the actual
program. When the program finishes it will return a
value as show in the documentation.
if ERRORLEVEL 17 goto OKGO
We use the DOS BATCH file command of IF ERRORLEVEL to
test the value which WDAY returned. When you use
ERRORLEVEL, please rememeber that the test is a greater
than or equal to test. That is if errorlevel >= {return
value} then the test is good, else bad.
Here we are testing for after 5pm. If it is currently
after 5pm, then the test is .True. and the batch routine
will go to the label :OKGO. If it is .False., then we
test for the before 8am timeframe.
Page 3
BATCH FILE INSTRUCTIONS (cont.)
===============================
if ERRORLEVEL 8 goto NOGO
Here we are testing for the remainder of the time
restriction. If the current time is after 8am, then we
go to the label :NOGO and do the things that will inform
the user that the DOOR is not available at this time.
If however the current time is not after 8am then it is
somewhere between 00:00 (midnight) and 7:59am - thus we
go ahead and allow entrance into the GAME DOOR.
Page 4
ACKNOWLEDGEMENTS AND CONSIDERATIONS
===================================
DOS is a regisistered trademark and copyright of Microsoft Corp.
Many thanks go to :
Robert Vostreys, SysOp of Faster-than-Light BBS (PCBoard) of Stone
Mountain, Georgia - and author of RNet software.
Chris Holko, SysOp of Iconian Gateway (WWIV) of Marietta, Georgia.
Page 5
Copyright 1991 by TRIAC Systems, ALL RIGHTS RESERVED
Freeware Program
by
Robert White
TRIAC Systems
925 Penny Lane
Marietta, Georgia 30067-4414
CIS : 72040,730
ILink : Shareware Conference
RIME : Shareware Conference
PNet : BBSUtils Conference
Documentation for Release Level 1.2 of 06/01/1991
INTRODUCTION
============
This program was written to provide a simple means for providing a
"timing" capability for DOS BATCH files.
When WDAY.EXE is used, you can test the DOS ERRORLEVELs in your batch
file to see (for instance) if it is after 3:00pm, in the month of April,
on a Tuesday.
This means that if you need a certain event to occur only after a
certain day, hour, minute, ect., that you can set up a batch file to
check for you.
Now, while I realize that there is *MUCH* better software out there
available to do just this, this program is still useful. For instance -
if you are a SysOp of a Bulletin Board System, then perhaps you need to
make sure that only certain door games can run after 6pm. Unless your
BBS software will allow you to define operation time restrictions for
each door, you have no way to regulate what a user can get into at
specific times.
By using the features of WDAY, you can place ERRORLEVEL checks within
the batch files that most BBSs use to start a door, and exit gracefully if
it is not after 6pm.
This means that you do not have to have a TSR, Device Driver, or other
memory hogging program, to catch the time for events that may or may not
occur regularly.
Page 1
OPERATION INSTRUCTIONS
======================
Program Useage :
From the DOS command line (example: C:\>_ ) :
WDAY
where
======================== ======================
Time based : /h = Hour (0-23)
/i = Minute (0-59)
Date : /m = Month (1-12)
/d = Day (1-31)
/r = Year (0-99) (Last 2 digits)
/w = Weekday # {default} (1-7) 1=Sun,2=Mon...7=Sat
Other: /? = Help
? = Help
Page 2
BATCH FILE INSTRUCTIONS
=======================
When using WDAY within a BATCH file, the only extra thing you
must do is to perform the BATCH file ERRORLEVEL test. Please
review the following sample BATCH file if you are not familiar
with ERRORLEVEL.
Example :
@echo off
f:
cd \pcb\doors\game1
WDAY /h
if ERRORLEVEL 17 goto OKGO
if ERRORLEVEL 8 goto NOGO
:OKGO
rem *** place your game door execute code here ***
goto ENDGAME
:NOGO
rem *** place the actions to do if between 8am and 5pm here ***
:ENDGAME
rem *** place code to return to your system here ***
Discussion/Explanations of above example :
WDAY /h
Well this line is the command which executes the actual
program. When the program finishes it will return a
value as show in the
if ERRORLEVEL 17 goto OKGO
We use the DOS BATCH file command of IF ERRORLEVEL to
test the value which WDAY returned. When you use
ERRORLEVEL, please rememeber that the test is a greater
than or equal to test. That is if errorlevel >= {return
value} then the test is good, else bad.
Here we are testing for after 5pm. If it is currently
after 5pm, then the test is .True. and the batch routine
will go to the label :OKGO. If it is .False., then we
test for the before 8am timeframe.
Page 3
BATCH FILE INSTRUCTIONS (cont.)
===============================
if ERRORLEVEL 8 goto NOGO
Here we are testing for the remainder of the time
restriction. If the current time is after 8am, then we
go to the label :NOGO and do the things that will inform
the user that the DOOR is not available at this time.
If however the current time is not after 8am then it is
somewhere between 00:00 (midnight) and 7:59am - thus we
go ahead and allow entrance into the GAME DOOR.
Page 4
ACKNOWLEDGEMENTS AND CONSIDERATIONS
===================================
DOS is a regisistered trademark and copyright of Microsoft Corp.
Many thanks go to :
Robert Vostreys, SysOp of Faster-than-Light BBS (PCBoard) of Stone
Mountain, Georgia - and author of RNet software.
Chris Holko, SysOp of Iconian Gateway (WWIV) of Marietta, Georgia.
Page 5
December 17, 2017
Add comments