Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch files multiline comment

Status
Not open for further replies.

malladisk

Programmer
Jun 14, 2001
69
0
0
US
Hi, is there a way to include a multiline comment into batch files other than repeated REM statements?
Thanks,
Sashi
 
not that I know of but what is wrong with:

echo off
rem blah blak blah balh
rem blah blak blah balh
rem blah blak blah balh
rem blah blak blah balh
rem blah blak blah balh
echo on



You will not see the words rem.
 
Well, nothing's wrong with it per se, but I'm a little lazy to put in a rem at the beginning of each line, that's all.
Thanks anyway,
Sashi
 
Kludge magic!

Rem - Big Comment Coming!
goto EndOfComment
Lots
of
rubbish
:EndOfComment

Simple?
 
It is plain and simple, put this in a file long.bat or so as a test, the Pause is there so you can see the results.

@echo This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work. This is a long text, as long as you do NOT press enter while typing this, it will display over several lines, as long as you want. There should be no LF or CR in the typing, so do not EVER press Enter to get to a new line or it will not work.

Pause

Marc [santa2]
[sub]If 'something' 'somewhere' gives 'some' error, expect random guesses or no replies at all.
Free Tip: The F1 Key does NOT destroy your PC!
[/sub]
Don't forget to shop @ for Christmas!
 
PS: you can replace the @echo with @REM, in which case the text will not be displayed.
If you put just REM instead, the text will show as above but with a rem in front.

Marc [santa2]
[sub]If 'something' 'somewhere' gives 'some' error, expect random guesses or no replies at all.
Free Tip: The F1 Key does NOT destroy your PC!
[/sub]
Don't forget to shop @ for Christmas!
 
Is this what you were looking for?

Marc [santa2]
[sub]If 'something' 'somewhere' gives 'some' error, expect random guesses or no replies at all.
Free Tip: The F1 Key does NOT destroy your PC!
[/sub]
Don't forget to shop @ for Christmas!
 
Marc, Loopyloo's answer is good enough for me. I know about making the REM statement not show up. I was looking for a way to include multiline comments.
Thanks, everyone!
Sashi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top