Search notes:

cmd.exe: the set command

In its basic form, set creates or removes cmd.exe variables. If a variable is created, it also assigns a value to the variable.
Create a variable (named text), assign a value to it and use the variable in an echo statement:
C:\> set text=Hello World
C:\> echo %text%
Hello World
Delete the variable:
C:\> set text=
set /a evaluates (simple!) mathematical expressions
set /p to get input from a user and assign it to an environment variable.

See also

set is affected by whether command extensions are enabled or disabled.
setlocal to localize changes to an environment
Other cmd.exe commands

Index