Command Prompt for Windows




Command LET

Function:

Evaluate an expression and set the specified environment variable with the result.

Syntax:

LET variable=expr
variableEnvironment variable name where the result is stored.
exprExpression to evaluate.

Note:

Parameter expr follows the same rules as parameter expr for command CALC. Also, when parameter expr includes characters that have a special meaning (eg. <, >, & etc) then enclose the complete expr in brackets, as follows :-

LET variable=( expr )

Examples on using LET.

Also see command SET, XSET, CALC and Batch Files.