Batch File Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to enter a 10 digit number for the %1 variable. Based on the third
digit, I would either jump to the :First or :Second section. Does anyone know
how to truncate the %1 variable so it can be checked against the 53* value
and still retain the full 10 digit, %1 variable for use elsewhere in the
batch file?

if %1==53* (
goto First
) else (
goto Second
)
:First
echo First Option
goto End
:Second
echo Second Option
goto End
:End
echo The End
 
echo off
if ((5299999999 GEQ %1) OR (5400000000 LEQ %1)) (
goto First
) else (
goto Second
)
:First
echo First Option
goto End
:Second
echo Second Option
goto End
:End
echo The End
 
Thanks Mark, I'll give this a try. This should work for me though checking
the number against an upper and lower boundry.
 
Back
Top