Do Batch files support multiline variables

Or you can create a “real” newline character.

setlocal enableDelayedExpansion
set NL=^


rem two empty line required
echo first line !NL! second line
set multi=Line1!NL!Line2
set multi=!multi!!NL!Line3
echo !Multi!

With this variant the newline is a “normal” character in the string, so the variables act normally and you can assign them to another variable, this is not possible with the &echo. trick (which is useful for simple tasks).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)