home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / dos_util / hottip.zip / WHATDAY.DOC < prev   
Text File  |  1993-08-24  |  2KB  |  40 lines

  1. WHATDAY.BAT                September 1993          Roland Segers
  2.                                                         Page 294
  3. ----------------------------------------------------------------
  4. Purpose:    Set up batch files to remind you to run specific
  5.             tasks on specific days of the week.
  6.  
  7. Syntax:         WHATDAY
  8.  
  9. Remarks:    It's a good idea to run your virus-checking program
  10.             weekly. Because many viruses are set to take effect 
  11.             on Fridays, you should scan for them before then.
  12.             Here's a batch file that checks the day of the week,
  13.             then runs your virus checker if it's Thursday.
  14.  
  15.                 @ECHO OFF
  16.                 ECHO @PROMPT SET WHATDAY=$0 > \TMP-DAY1.BAT
  17.                 COMMAND /C \TMP-DAY1 > \TMP-DAY2.BAT
  18.                 CALL \TMP-DAY2
  19.                 DEL \TMP-DAY?.*
  20.                 IF %WHATDAY% == Thu GOTO Thursday
  21.                 GOTO END
  22.                 :Thursday
  23.                 REM Put the command to launch your virus
  24.                     scanner here.
  25.                 :END
  26.  
  27.             In place of the wrapped REM line above, substitute
  28.             your virus checker's path and command line. Next,
  29.             open AUTOEXEC.BAT in an ASCII text editor and add 
  30.             the line CALL WHATDAY after your PATH statement
  31.             (on a line below the PATH statement) and before any
  32.             lines that run menus.
  33.  
  34.             It's easy to add additional weekly duties to WHATDAY.
  35.             BAT. Simply copy the line beginning IF %WHATDAY%, 
  36.             replace "Thu" with the three-letter abbreviation for
  37.             the day you want, and replace the GOTO statement 
  38.             with any command you want to run.
  39.  
  40.