home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.ibm.pc.misc:14466 comp.os.msdos.misc:6050
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!cleveland.Freenet.Edu!ci922
- From: ci922@cleveland.Freenet.Edu (Duane A. Paulson)
- Newsgroups: comp.sys.ibm.pc.misc,comp.os.msdos.misc
- Subject: Re: Looking for a 'day of week checker' batch program
- Date: 7 Nov 1992 05:14:48 GMT
- Organization: Case Western Reserve University, Cleveland, OH (USA)
- Lines: 46
- Message-ID: <1dfjc9INNdoq@usenet.INS.CWRU.Edu>
- References: <BxAt8z.8K1@news.udel.edu>
- Reply-To: ci922@cleveland.Freenet.Edu (Duane A. Paulson)
- NNTP-Posting-Host: hela.ins.cwru.edu
-
-
- In a previous article, don@chopin.udel.edu (Donald R Lloyd) says:
-
- >
- >
- > I need to track down a small program for use in batch files that
- >will check to see if it is a certain day of the week and call a
- >program or batch file if so.
- > For example, when the user comes into work in the morning and
- >boots up, a line in the autoexec would do something along the lines of
- >
- > "is_day tuesday tues.bat",
- >
- > so if today is tuesday it will call the batch file 'tues', otherwise
- >the line will be ignored.
- >
- > Anyone know if a program such as this exists, or will I have to
- >track down a compiler somewhere and roll my own?
- >
- >
-
- Cut the following and save to is_day.scr. From the dos prompt, type
- "debug < is_day.scr" to construct is_day.com. There is one blank line before
- the line containing "rcx" that must be included. The following dos functions
- are used:
- 2A -- get date function. Returns day of week (0=Sun...6=Sat) in al.
- 4C -- exit to system with errorlevel in al. (Therefore, errorlevel = day of week.
-
- ----------------------------------------------------------------------------
- n is_day.com
- a 100
- mov ah,2a
- int 21
- mov ah,4c
- int 21
-
- rcx
- 8
- w
- q
- ----------------------------------------------------------------------------
-
- --
- Duane Paulson
- ci922@cleveland.freenet.edu
- duane.paulson@pcb.batpad.lgb.ca.us
-