In this post, Learn how to add a new line to the text displayed with the echo command in a batch file.
For example, Want to print the text in multiple lines as given below
There are multiple ways to break lines in echo text.
You can use
echo: to insert the new blank line in the command line output.
@echo off echo one echo: echo two
multiplelines.bat in the command line,
Output is shown as
Similarly, replace the above with a single syntax using the
@echo off & echo one & echo:& echo two
Other alternatives to echo: are below
echo( echo+ echo, echo; echo+
How to echo a multi-line and write to a text file?
> symbol outputs to the filename
@echo off & echo one & echo:& echo two > multlines.txt