set
creates or removes cmd.exe
variables. If a variable is created, it also assigns a value to the variable. text
), assign a value to it and use the variable in an echo
statement: C:\> set text=Hello World C:\> echo %text% Hello World
C:\> set text=
set /a
evaluates (simple!) mathematical expressions set /p
to get input from a user and assign it to an environment variable. set
is affected by whether command extensions are enabled or disabled. setlocal
to localize changes to an environment