samedi 16 novembre 2019

Batch file code does not implement goto properly

Im trying to create a menu driven program this is the first menu and the goto isnt working as no matter what option i input it always outputs the first (User). (this is still the beginning of my program so called files or goto dont do much except echo the option clicked)

@echo off
rem this is the home page
rem


cls
echo Welcome to our program!
echo Home page
echo 1: User management
echo 2: Filing system
echo 3: System info
echo 0: exit

set /p "%1=Please select one of the above: "
if "%1"=="1" goto user
if "%1"=="2" goto file
if "%1"=="3" goto system
if "%1"=="0" goto exit

:user
call Userpage.bat
goto end

:file
call Filepage.bat

:system
echo system
goto end

:exit
echo exit
goto end

:end

Aucun commentaire:

Enregistrer un commentaire