Just trying to check if a function exists before trying to execute that Function. I fear I may be trying to go to simple with this, I should probably be checking the string prior to executing the Process loop.
SET /P Selection=Please Select Options?
echo You chose: %Selection%
Call :Process
pause
goto :EOF
:Process
for %%A in (%Selection%) do (
if not exist :Opt%%A (Call :Redo) ELSE (Call :Opt%%A)
)
GOTO :EOF
:Redo
Echo %Selection%
SET /P Selection=Selection was Invalid, Please choose a Valid Option:
Call :Process
GOTO :EOF
:Opt1
ECHO Option 1's code
GOTO :EOF
So the problem I'm getting is that I seam to get stuck in if not exist statement and well is not allowing the functions to run correctly.
Thanks in advance