home *** CD-ROM | disk | FTP | other *** search
- break off
- echo off
- rem
- rem CHECK.BAT
- rem
- rem Sample batch file which uses ckcd.com to check for carrier on COM1:
- rem and activate the ubiquitous WATCHDOG utility only if carrier is detected.
- rem Used as part of a BBS email checking facility.
- rem
- ckcd 1
- if ERRORLEVEL 2 goto oops
- if ERRORLEVEL 1 goto dogon
- if ERRORLEVEL 0 goto nodog
-
- rem jumps here is there's an error
- :oops
- echo Error occurred while checking carrier!
- goto exit
-
- rem jumps here if CD high (remote mode)
- rem turns WATCHDOG on
- rem
- :dogon
- watchdg1 on
-
- rem jumps here to skip the watchdog invocation (local mode)
- rem
- :nodog
- rem
- rem Do whatever you want here - in this case, we check for mail
- rem
- getmb3
- watchdg1 off
-
- :exit
- rem end of batch file
-