set
Windows CMD · System · available in the simulator
What it does
Displays or sets environment variables in CMD.
Syntax
set [variable=[cadena]] [/p variable=texto] [/a expresión]
Options and parameters
/AEvaluates a numerical expression and assigns it to the variable.
set /a total=2+3/PPrompts the user for a value and assigns it to the variable.
set /p nombre=Escribe tu nombre:
Usage examples
setset MI_VAR=holaset /a total=2+3set /p nombre=Escribe tu nombre:
Notes and common mistakes
- Without arguments, displays all environment variables for the current session.