Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watdcsu.UUCP Path: utzoo!watmath!watdcsu!rsellens From: rsellens@watdcsu.UUCP (Rick Sellens - Mech. Eng.) Newsgroups: net.micro.pc Subject: Re: Running batch files without echoing commands Message-ID: <1145@watdcsu.UUCP> Date: Thu, 21-Mar-85 10:33:33 EST Article-I.D.: watdcsu.1145 Posted: Thu Mar 21 10:33:33 1985 Date-Received: Fri, 22-Mar-85 01:15:23 EST References: <1274@aecom.UUCP> <1128@utastro.UUCP> Reply-To: rsellens@watdcsu.UUCP (Rick Sellens - Mech. Eng.) Distribution: net Organization: U of Waterloo, Ontario Lines: 38 Summary: In article <1128@utastro.UUCP> nather@utastro.UUCP (Ed Nather) writes: >> Hi... >> >> Does anybody know how to run a batch file in msdos without >> any echoing of commands. I hate to use `echo off` as the first command >> because then "echo off" is echoed!! >> >> thanx alot, >> schwady > >I always use "echo off" as the first line, followed by the escape sequence >that jumps the cursor to the beginning or the line, then the sequence that >erases the line, then the sequence that moves the cursor up a line (to >compensate for the newline after the "echo off") -- this leaves the screen >and cursor as you would want them, but the "echo off" flashes momentarily >while all this is going on. Shabby, kludgy, awful -- but it works, if you >have "device=ansi.sys" in your "config.sys" file. > >Stuff that provides gratuitous output, like the copy command, can be silenced >by the following: > > copy *.* newdir > nul Any text following "echo off" on the same line is ignored by the batch processor, but echoed to the screen. I put an identifying message in this area to describe the routine that's been invoked. I think this is less ugly than an "echo off" all by itself. Redirection to nul keeps things nice and neat, but I found that when used in my autoexec it caused some obscure bugs to appear in some of the stuff I was loading in over DOS. I don't know why, but it might be something to check if strange things start happening. Rick Sellens UUCP: watmath!watdcsu!rsellens CSNET: rsellens%watdcsu@waterloo.csnet ARPA: rsellens%watdcsu%waterloo.csnet@csnet-relay.arpa