I need to check if a parameter that is passed to a Windows Batch file is a numeric value or not. It would be good for the check to also works for variables.
I found a
SET "var="&for /f "delims=0123456789" %%i in ("%1") do set var=%%i if defined var (echo %1 NOT numeric) else (echo %1 numeric)
Replace %1 with %yourvarname% as appropriate
%1
%yourvarname%