concat 2 strings in batch file code example
Example 1: concatenate strings batch
SET a = Hello
SET b = World
SET c=%a% and %b%
echo %c%
-- output --
Hello and World
Example 2: batch concatenate strings
SET Wld=World
echo Hello %Wld%
SET a = Hello
SET b = World
SET c=%a% and %b%
echo %c%
-- output --
Hello and World
SET Wld=World
echo Hello %Wld%