home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
dos_util
/
hottip.zip
/
WHATDAY.DOC
< prev
Wrap
Text File
|
1993-08-24
|
2KB
|
40 lines
WHATDAY.BAT September 1993 Roland Segers
Page 294
----------------------------------------------------------------
Purpose: Set up batch files to remind you to run specific
tasks on specific days of the week.
Syntax: WHATDAY
Remarks: It's a good idea to run your virus-checking program
weekly. Because many viruses are set to take effect
on Fridays, you should scan for them before then.
Here's a batch file that checks the day of the week,
then runs your virus checker if it's Thursday.
@ECHO OFF
ECHO @PROMPT SET WHATDAY=$0 > \TMP-DAY1.BAT
COMMAND /C \TMP-DAY1 > \TMP-DAY2.BAT
CALL \TMP-DAY2
DEL \TMP-DAY?.*
IF %WHATDAY% == Thu GOTO Thursday
GOTO END
:Thursday
REM Put the command to launch your virus
scanner here.
:END
In place of the wrapped REM line above, substitute
your virus checker's path and command line. Next,
open AUTOEXEC.BAT in an ASCII text editor and add
the line CALL WHATDAY after your PATH statement
(on a line below the PATH statement) and before any
lines that run menus.
It's easy to add additional weekly duties to WHATDAY.
BAT. Simply copy the line beginning IF %WHATDAY%,
replace "Thu" with the three-letter abbreviation for
the day you want, and replace the GOTO statement
with any command you want to run.