@VARTYPE[var] : Returns the type (if any) for the specified variable name. The possible values are:
| 0 | No type |
| 1 | Integer (0-9) |
| 2 | Decimal (0-9, the decimal character, and the thousands separator) |
| 3 | Hex (0-9, A-F) |
| 4 | Boolean (0 or 1) |
| 5 | Alphabetic (A-Z and a-z) |
| 6 | Alphanumeric (A-Z, a-z, and 0-9) |
| 7 | Regular expression |
Variable types are set with the SET /T:type option.
Example:
set /t:2 tempvar=42
echo %@vartype[tempvar]
2