String Concatenation

Add one string to another string.

Description: This example shows how to add two strings in DOS.
Script:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
set "str1=Hello"
set "str2=World"

set "str3=%str1%%str2%"
set "str4=%str1% %str2%"
set "str1=%str1% DOS %str2%"

echo.%str3%
echo.%str4%
echo.%str1%
Script Output:
 DOS Script Ouput
HelloWorld
Hello World
Hello DOS World