Batch File Help

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
 
G

Guest

Actually this line "based on the third digit" should read, based on the
second digit.
 
G

Guest

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
 
G

Guest

Thanks Mark, I'll give this a try. This should work for me though checking
the number against an upper and lower boundry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top