Displaying a BLANK line in a batch file?

  • Thread starter Thread starter Blue Max
  • Start date Start date
B

Blue Max

When composing a batch file, how do we display or ECHO a blank line to
separate blocks of text displayed on the screen for the user? To date we
have had to ECHO a period "." for blank lines, but would like to get rid of
the period also and display nothing. For example, can be echo something
like a 'Line Feed' code to add a blank line?
 
Put "echo off" at the start, and the "." will not display.

Test this...

Test.bat
======
echo off
echo Two blank lines below then pause.
echo.
echo.
pause
=====

Output looks like this...

========
U:\>echo off
Two blank lines below then pause.


Press any key to continue . . .
========

Without the "echo off", you actually see "echo." instead of a blank line.

-Frank


-Frank
 
Oops.. slight correction, make that "@echo off" at the start, so the "echo
off" won't display either :)

-Frank
 
Thanks!! Frankster. Somewhere in my earlier DOS years I remember using this
syntax often, getting too old I quess! I simply failed to remember that the
period immediately followed the ECHO statement, without any space. That was
most helpful and just in time to fix the file before saving it.

THANKS!

*****************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top