Page 1 of 1

Echo Parentheses

Posted: 30 Jul 2024 09:32
by lmstearn
Curious about the usage of the newline separator in the block - the closest search hit was in ECHO. FAILS to give text or blank line - Instead use ECHO/ thread

Code: Select all

@echo off
echo(
Setlocal EnableDelayedExpansion
set NL=^
SET /P Text="First Line!NL!Second Line!NL!"
if /I !Text!==f goto FIRST
if /I !validateText!==s goto SECOND
goto ENDSCRIPT
:FIRST
:SECOND
@echo off
Although it's very easy in this case not to worry about the escape character assignment, just inserting echo First Line at the top of the script, are any valid alternatives with a newline separator together with echo( recommended?
Thanks. :)