On 1 Mrz., 18:52, "Frank P. Westlake" <
frank.westl...@gmail.net>
wrote:
Like Frank shows, it's easy to create a single linefeed character with
SET LF=^
rem ** Two empty lines are required here
And there are multiple ways to use it.
echo Line1^%LF%%LF%Line2
Or
set NLM=^^^%LF%%LF%^%LF%%LF%
echo Line1%NLM%Line2
Or the easiest one
setlocal EnableDelayedExpansion
echo Line1!LF!Line2
With EnableDelayedExpansion it's also works inside of quotes without
any problems
To create a CR character you could use the copy /z technic
for /f %%a in ('copy /Z "%~dpf0" nul') do set "CR=%%a"
To use the CR character you could only use %%Loop-Variables or
DelayedExpansion, I didn't found a way to use it with percents.
I assume CR's are removed directly after the percent expansion phase.
But this one works
echo You and me!CR!Tim
Creates the screen output "Tim and me" (the word "Two" will be
overridden
jeb