home *** CD-ROM | disk | FTP | other *** search
- SAMPLE command | Comments about the output
-
- ESC [2J This escape string will clear the screen if ANSI.SYS is
- installed. See the CONFIG.SYS DEVICE topic.
-
- ESC E > PRN This escape string will be sent to the printer. Notice
- the use of redirection (>) to accomplish this.
-
- BAT file that can be used if the ESC command is not present on your DOS:
- @ECHO OFF
- REM Usage: ESC character-string [device-name]
- REM ^[ below should be an ASCII ESC character (27).
- REM Redirection cannot be used to redirect the output of batch files,
- REM so a second (optional) device-name is allowed.
- IF zip%2==zip GOTO nodevice
- FOR %%$ IN (0l 1l 2l 3l 4l 5l 6l 7l 0h 1h 2h 3h 4h 5h 6h 7h) DO IF %2==%%$ GOTO ISEQUAL
- FOR %%a IN (PRN prn PRN: prn: LPT1 lpt1 LPT1: lpt1:) DO IF %2==%%a GOTO prn
- GOTO nodevice
- :prn
- ECHO ^[%1 > %2
- GOTO xxit
- :isequal
- REM DOS treated "=" as a separator, but we know better
- ECHO ^[%1=%2
- GOTO xxit
- :nodevice
- IF zip%1==zip GOTO xxit
- ECHO ^[%1
- :xxit
- EXIT