Computing.Net > Forums > Disk Operating System > Adding text mesages to autoexec.bat

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.

Adding text mesages to autoexec.bat

Reply to Message Icon

Name: Colin
Date: October 24, 2001 at 11:23:41 Pacific
Comment:

I have DOS 6.22 installed
and I whant to add text mesages to the autoexec.bat file

I can add the text no problem ..BUT when thh PC boots up for every line of text I entered it displayes..
C:\>
Bad command or file name

How can I stop it from displaying the Bad command or file name?
Do I use brackets or somthing so it will just display my message??



Sponsored Link
Ads by Google

Response Number 1
Name: Kringla
Date: October 24, 2001 at 11:40:51 Pacific
Reply:

You have too write like this:

echo off
echo Message to user


Echo off means that echo donīt shows. But if you jsut want a text for your self in the file, that donīt echo on the screean write REM first in the line



0

Response Number 2
Name: Chris Hodapp
Date: October 24, 2001 at 13:09:51 Pacific
Reply:

"echo" works fine, you can also make a simple text file, put whatever you want in it, call it TEXT.TXT or whatever, and then put TYPE TEXT.TXT in AUTOEXEC.BAT near the end.
That is, if you're trying to add text that will display, not comments. For comments... use like Kringla mentioned (REM).


0

Response Number 3
Name: fred6008
Date: October 24, 2001 at 14:34:30 Pacific
Reply:

You want to add comments to your autoexec.bat? You could type REM and a space at the left of each comment line. But the conventional way to remark any batch file is to begin the comment line with a semicolon like this.
; I am adding these lines to explain that the
; first line after commentary is the Driver
; for my CD-ROM.
The lines with the semicolons will have
no effect whatsoever on the processing of the
autoexec.bat. In fact the Windows 3.1 startup files like SYSTEM.INI for example do not recognize REM and only a semicolon will
remove the line from processing.


0

Response Number 4
Name: astroraptor
Date: October 24, 2001 at 15:56:12 Pacific
Reply:

Actually fred, it's a colon. You can also just skip that and do this:

@ECHO OFF
GOTO START

No colons or REMs needed, it'll automatically skip to the START label so you can write anything you want here.

:START
:the rest of the AUTOEXEC file


0

Response Number 5
Name: W.L.
Date: October 24, 2001 at 16:49:05 Pacific
Reply:

: is a label
:: equals rem
rem equals remark

One one of my very old computers it gives a message

echo Well if your game hit a key and maybe
echo this peice of junk will actually boot.
pause >nul

lol

W.L.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






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: Adding text mesages to autoexec.bat

autoexec.bat file on start-up www.computing.net/answers/dos/autoexecbat-file-on-startup/9867.html

autoexec.bat www.computing.net/answers/dos/autoexecbat/10401.html

Autoexec.bat & Config.sys link www.computing.net/answers/dos/autoexecbat-configsys-link/16797.html