Please find Below:
The SET statement is used when you want a variable to hold the string or numeric value that is to the right of the Equal (=) sign.
When used, the variable is substituted by its value.
- Variables can be used in the script for macro expansion and in various control statements.
- This is very useful if the same string is repeated many times in the script, e.g. a path.
Set variable = string
Eg : Set Myvar=2*3 returns “ 2*3”
The let statement, in opposition to the set statement, evaluates the expression on the right side of the ' =' before it is assigned to the macro variable.
Let variable = Expression
Eg : Let MyVar =2*3 returns “6”
Hope it helps..
The below explanation may help you.
The let statement is a complement to the set statement, used for defining script variables. The let statement, in opposition to the set statement, evaluates the expression on the right side of the ' =' before it is assigned to the variable.
The set statement is used for defining script variables. These can be used for substituting strings, paths, drives, and so on.
Syntax:- Set variablename=string