@VARTYPE[var] : Returns the type (if any) for the specified variable name. The possible values are:

 

0No type
1Integer (0-9)
2Decimal (0-9, the decimal character, and the thousands separator)
3Hex (0-9, A-F)
4Boolean (0 or 1)
5Alphabetic (A-Z and a-z)
6Alphanumeric (A-Z, a-z, and 0-9)
7Regular expression

 

Variable types are set with the SET /T:type option.

 

Example:

 

set /t:2 tempvar=42

echo %@vartype[tempvar]

2