home *** CD-ROM | disk | FTP | other *** search
-
- IF2DAY
- Batch Enhancer
- Gary Miller
- 72657,3010
- 1/20/91
-
- While wandering through one of my BAT files I realized that there
- are processes that need not be run every day but I did rather than never
- run them at all. Yet another program appeared recently that I'd like
- to occasionally use and that started this effort.
- The key thought here is a batch process to be run only on certain
- days of the month. Thus in your AUTOEXEC.BAT you could:
-
- @ECHO OFF
- REM if today's date is the 4th or 24th of the month
- IF2DAY is_4 or_24 run ECHO Remember to do backup today !!
- IF ERRORLEVEL 1 PAUSE
-
- or in the case of periodic cleanups:
-
- REM Cleanup files every Tuesday
- IF2DAY is_Tuesday run CHKDSK
- or
- REM every other morning empty the bit bucket
- IF2DAY is_Odd and_Am run ERASE C:\BIT\BUCKET\*.*
-
- The options "is_", "and_", "or_" and " run " must be in lower
- case letters and the Day of the week (Sunday Friday), "Odd" and "Even"
- must start in capital letters but only the first letter should be
- capitalized. You can also use "Am" or "Pm" with "is_","and_" and "or_".
- Finally, you can set a time limit
-
- REM Check for disk fragmentation Monday morning
- IF2DAY is_Monday aft_09:30 B4_11:00 run CHKFRAG
-
- using either "B4_HH:MM" and/or "aft_HH:MM".
-
- IF2DAY will execute a COM, EXE or BAT file with appropriate command
- line options or no options if none are required. It will also execute
- the standard DOS commands. IF2DAY accomplishes this by loading a
- secondary copy of the transient portion of COMMAND.COM and a copy of
- the environment. Because it is transient the COM, EXE, or BAT file you
- run should leave nothing behind them in memory or alter the
- environment. You should not use it to load any TSR's or execute the
- SET, PROMPT or PATH commands which alter the environment.
-
-
- If IF2DAY.COM
- cannot validate the command line it will signal an error
- and return ERRORLEVEL=0, for failure.
-
- finds NONE of the conditions true, it will return
- ERRORLEVEL=0, for failure.
-
- is given just the desired conditions that are true and no
- "run" instruction, it will quietly return
- ERRORLEVEL=1, for success.
-
-
- Gary Miller
-
-
- And now a word from the lawyers:
-
- Copyright (c) 1991 Gary R. Miller . All Rights Reserved.
-
- You are free to use, copy and distribute IF2DAY providing that:
-
- NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION.
-
- IT IS NOT MODIFIED IN ANY WAY.
-
- THIS DOCUMENTATION FILE (UNMODIFIED) ACCOMPANIES ALL COPIES.
-
- This program is provided AS IS without any warranty, expressed or
- implied, including but not limited to fitness for a particular purpose.
-
-
-