Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have two problems with the echo command not displaying as I would like.
The system reads the second line as “echo on”. Can a line starting with the word “on” follow the echo command and still display properly? Is there a work-around?
echo I want to go home
echo on Friday.
I cannot get the second line to display:echo Add this line to BATCHFILE.BAT:
echo if exist c:\GdCookie\nul xcopy /y c:\GdCookie\*.* c:\Windows\Cookies>nul(These are instructions I want to display on screen about how to add a line to a batch file. (GdCookie is a folder. The line works in the batch file; I just can’t get it to display properly.)
======================================================
It is the mark of an educated person never to demand more precision than the nature of the subject allows. (Aristotle) But I don’t want any less, either.

Concerning your echo ON problem. What I would do is a cheap fix, but you would have a space at left before each line is displayed.
First line: echo I want to go home (With 2 spaces between echo and I).
Second line: echo, one space, then Alt+255 (use the number pad on the right side of the keyboard), then on Friday. The Alt+255 is the non-appearing character in the original Ascii table, it is treated like a character but it looks like a space. This makes Dos think there is a three-letter word after the echo statement.
By-the-way, thanks for all the good posts you keep putting up in the ME forum, Ren Man

how about saving the instructions to a file, then just 'type' the file onto the screen.
type howto.txt | more

Hi RMan. Worm is right, ECHO.ON will do it:
echo.I want to go home
echo.on Friday.About echoing the > (greater than) character, there are many methods to do that. I'll show two methods, both using PROMPT:
@echo off
echo @prompt a $G b$_> %temp%.\temp.bat
%comspec% /c %temp%.\temp.bat |FIND "a"
del %temp%.\temp.bat@echo off
echo.EXIT|%comspec%/k prompt a $G b$_|FIND "a"Watch out for line wrapping. Such methods may also display the < (lower-than) char (use $L) and the | (pipe) char (use $B), which aren't ECHOable. Type prompt/? for more information.
It's possible to put any character into a file via batch file, even a ctrl+z char.
-- Secret_Doom - Leonardo Pignataro --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |