home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
pbaseiv.zip
/
P4DOS006.TIP
< prev
next >
Wrap
Text File
|
1991-12-16
|
2KB
|
38 lines
The DOS ECHO command doesn't provide any obvious way to
display a blank line. But there's a simple solution to the
problem: On a blank line in your batch file, type ECHO,
press <Space>, then hold down the <Alt> key as you type 255
on the numeric keypad. When you release the <Alt> key, the
cursor will move as if you'd just typed a space. But when
you run your batch file, a blank line will appear.
This technique also lets you ECHO the words on and off,
which would normally be interpreted by the command processor
as part of the command. You simply type ECHO, press the
<Space> bar, type <Alt>-255, then type ON or OFF. But I
still haven't figured out how to ECHO a < or > character
without getting a `File not found' error message.
G. F. Christiann
Ft. Lauderdale, Florida
Editor's note: This trick relies on the fact that the line
you're displaying isn't really blank; it contains ASCII
character 255, which just happens to appear on screen as a
blank. You can also use ECHO followed immediately by a
period to make a batch file display a blank line.
As for displaying the < and > characters--you can't use the
ECHO command to show them by themselves, but you can ECHO
them as part of a string enclosed in double quotes. In other
words, ECHO > won't work, but ECHO ">" will. The double
quotes will appear along with the string, which looks
ridiculous by itself, but is fine if you're describing a
command, as in ECHO TYPE "TYPE filename > PRN".
Title: Drawing a Blank in a Batch File
Category: DOS
Issue date: Oct 1991
Editor: Brett Glass
Supplementary files: NONE