WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: warren on February 09, 2016, 06:04:13 AM

Title: insert a multi-line text block into a variable
Post by: warren on February 09, 2016, 06:04:13 AM
Normally to assign text to a variable you can just say:

myvar = "this is some text"

But if I have a multi-line block of text it is more difficult. In the past I have always broken it up line by line and used strcat to concatente the lines, with a @CRLF at the end of each, or saved blocks of text as text files and inserted those into my variable. There has to be a better way! How can I do something like

myvar = "
this is line 1
this is line 2
this is line3
"
?

Thanks!
Title: Re: insert a multi-line text block into a variable
Post by: JTaylor on February 09, 2016, 06:32:07 AM
If you take a look at the release notes for the current Beta version you will find what you seek. 

Jim