home *** CD-ROM | disk | FTP | other *** search
- Echo Off
- If NOT '%1'=='' GOTO PARM
- CLS
- Echo ------------- TimeRead.Com Demo Batch File --------------
- Echo
- Echo To use this Demonstration, invoke it by typing
- Echo >>═══ 'TR-DEMO filename.ext' ═══<<
- Echo from the DOS prompt.
- Echo
- Echo The filename you specify will be the one you want to
- Echo ERASE.
- Echo
- Echo You will then be asked if you REALLY do want to
- Echo delete the file.
- Echo If you answer 'Y' the file will be ERASEd.
- Echo If you answer 'N' the ERASEure will be aborted.
- Echo If you do not answer within 3 sec., the batch file
- Echo will assume that you don't want to erase it.
- Echo
- Echo
- Echo
- Pause
- CLS
- Echo ------- PROGRAM INFO --------
- Echo
- Echo Invoke TimeRead.Com by typing 'TIMEREAD' in your batch file.
- Echo
- Echo The program will wait 3 sec. for input and if a
- Echo key has not been pressed in that time, it will return
- Echo to the batch file with ERRORLEVEL set to 2.
- Echo If the response from the keyboard was 'Y' or 'y' an
- Echo ERRORLEVEL of 1 will be returned.
- Echo If 'N' or 'n' was input, the ERRORLEVEL will be 0.
- Echo
- Echo When testing in your batch file for the ERRORLEVEL,
- Echo ALWAYS test in decending order or it will not work.
- Echo (i.e. IF ERRORLEVEL 2....1....0...)
- GOTO END
- :PARM
- Echo Are you sure you want to ERASE
- Echo %1 ???
- TimeRead
- IF ERRORLEVEL 2 GOTO TIMEOUT
- IF ERRORLEVEL 1 GOTO YES
- IF ERRORLEVEL 0 GOTO NO
- GOTO END
- :TIMEOUT
- Echo ( No input received....assuming 'NO' response.)
- GOTO NO
- :YES
- Echo ERASEing %1..........
- ERASE %1
- Echo ........%1 ERASEed!!
- GOTO END
- :NO
- Echo ****** ERASE of %1 Aborted ******
- GOTO END
- :END
- Echo ------- Demo Complete --------
- GOTO E