[comp.sys.ibm.pc] BATCH files that do not echo

dhesi@bsu-cs.UUCP (Rahul Dhesi) (03/20/88)

Regarding the frequently-asked question about how to make batch files
not print "echo off", the answers are:

1.   For MSDOS 2.x I know of no way to suppress the initial "echo off"
except for redirecting output to NUL, which suppresses everything
printed, which is not usually what you want.

2.   For MSDOS 3.1 there are patches I have seen floating around on
BBSs that will make "echo off" the default, so you won't have anything
echo unless the first line of the batch file is "echo on".  But the
patch varies between versions and machines and I have none that works
on all versions.  Just get used to it.

3.   For MSDOS 3.3 or so, there is an explicit mechanism that I haven't
used, because I don't use 3.3, that lets you suppress echoing of a line
selectively, thus letting you suppress the initial "echo off".
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi

georgep@vice.TEK.COM (George Pell) (03/22/88)

In article <2412@bsu-cs.UUCP>, dhesi@bsu-cs.UUCP (Rahul Dhesi) writes:
> Regarding the frequently-asked question about how to make batch files
> not print "echo off", the answers are:
> ........
> 1.   For MSDOS 2.x I know of no way to suppress the initial "echo off"
> ........
> 2.   For MSDOS 3.1 there are patches I have seen floating around on
> ........
> 3.   For MSDOS 3.3 or so, there is an explicit mechanism that I haven't
> used, because I don't use 3.3, that lets you suppress echoing of a line
> selectively, thus letting you suppress the initial "echo off".

For IBM Dos 3.3 use "@echo off"

jamesd@percival.UUCP (James Deibele) (03/23/88)

    I assume that the original poster is trying to write a batch file that
is semi-"pretty" --- clears the screen, moves the cursor down a few lines,
then prints some message like "Going to format your hard drive now.  Y'all
sure y'all want to do this?"  The easiest way I know of to do that is to
use ECHO Alt-255.  That's done by holding down the Alt key and pressing 2,
5,5 on the numeric keypad.  Works with all DOS's that I've used (2.1 - 3.21).
Sample fragment:

echo off
cls
echo (alt-255)
echo (alt-255)
echo       Hi.  I'm going to destroy everything on your hard disk.
echo       If you don't want to do this, press Ctrl-Break.
pause
format C:

etc.

-- 
James S. Deibele   jamesd@qiclab or jamesd@percival
TECHBooks: The Computer Book Specialists   (800) TECH-BKS
3646 SE Division  Portland, OR  97202      (503) 238-1005
TECHBooks One BBS (#1:105/4.0); 3/12/24    (503) 760-1473