Computing.Net > Forums > Windows Me > ECHO wont display word ON or DOS command

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 ON or DOS command

Reply to Message Icon

Name: Renaissance Man
Date: May 6, 2002 at 16:04:38 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 displays if I use quotes, but I don't want the quotation marks to show up.

======================================================
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: Huey
Date: May 6, 2002 at 17:46:42 Pacific
Reply:


RM,

This had me stumped for a while, though this is not the perfect solution it might be of help.

It bypasses the 'echo on' command but indents the text by one character.

echo+[space]your text

The + sign must be included directly after echo.

Regards

Huey


0

Response Number 2
Name: Huey
Date: May 6, 2002 at 17:52:23 Pacific
Reply:


RM,

Forget the [space], works perfectly

Huey


0

Response Number 3
Name: JackG
Date: May 6, 2002 at 20:13:16 Pacific
Reply:

The "offical" documented way to do this is to use the period after echo. I have never seen the + documented as working (supported).
But I have seen it in Batch files from Microsoft.

ECHO.On Friday

This is an extension of "ECHO." being defined as the way to insert a blank line in the output of a batch file.


It is recommended that the redirected output to nul: use the form ">>nul" instead of just ">nul". While not a problem in Windows, in some versions of Real DOS x.xx, the repeated use of ">nul" will use up all the available file handles and can cause an Open file to be closed. Ran into the problem one time when logging output of commands to files from some commands and not others.

The ">" causes a new file handle to be opened and used, were the ">>" is append to existing file handle used for nul:.


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 Windows Me Forum Home


Sponsored links

Ads by Google


Results for: ECHO wont display word ON or DOS command

DOS commands in ME www.computing.net/answers/windows-me/dos-commands-in-me/22651.html

dos commands will not work www.computing.net/answers/windows-me/dos-commands-will-not-work/37881.html

To all who want Real Mode DOS back... www.computing.net/answers/windows-me/to-all-who-want-real-mode-dos-back/737.html