Computing.Net > Forums > Disk Operating System > ECHO wont display word

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

ECHO wont display word

Reply to Message Icon

Name: Renaissance Man
Date: May 6, 2002 at 15:58:23 Pacific
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: hukre
Date: May 6, 2002 at 20:04:35 Pacific
Reply:

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


0

Response Number 2
Name: W0rm
Date: May 6, 2002 at 21:01:38 Pacific
Reply:

If I recall correctly, I used to use 'echo.on'
- W0rm
- http://dos.li5.org


0

Response Number 3
Name: dagul
Date: May 7, 2002 at 00:27:05 Pacific
Reply:

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

type howto.txt | more


0

Response Number 4
Name: Secret_Doom
Date: May 7, 2002 at 14:49:22 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: ECHO wont display word

Batch file menu Problems www.computing.net/answers/dos/batch-file-menu-problems/14071.html

Batch files at shutdown - #6781 sequel www.computing.net/answers/dos/batch-files-at-shutdown-6781-sequel/6912.html

PCI Modem/Dos, DRIVERS??? www.computing.net/answers/dos/pci-modemdos-drivers-/1069.html