If so How?
Yes, batch files are lame, but I cannot use powershell, and I don't feel like writing a real app to do this simple task....
edit
What i want is somthing along the lines of
set var="this is a multi line string "
There is no practical limit to the number of parameters you can pass to a batch file, but you can only address parameter 0 (%0 - The batch file name) through parameter 9 (%9).
Represents a replaceable parameter. Use a single percent sign ( % ) to carry out the for command at the command prompt. Use double percent signs ( %% ) to carry out the for command within a batch file. Variables are case sensitive, and they must be represented with an alphabetical value such as %a, %b, or %c. ( <set> )
Batch scripts support the concept of command line arguments wherein arguments can be passed to the batch file when invoked. The arguments can be called from the batch files through the variables %1, %2, %3, and so on.
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).
Is that ok?
@echo off set var=kur set var2=kur2 echo var is = "%var%" and var2 is = %var2%
edit
is that what you mean ?
@echo off set nl=^& echo. echo this%nl%is%nl%multiline%nl%string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With