@echo OFF REM goto point tag for the main menu :MENU REM clear the screen CLS REM Display the Menu echo. echo ------------------------------- echo press 1, 2, or 3 to select your echo option or 4 to exit echo ------------------------------- echo 1 - Option 1 echo 2 - Option 2 echo 3 - Option 3 echo 4 - Option 4 echo 5 - Option 5 echo 5 - Option 6 echo ------------------------------- echo. REM Reading the user input in the variable selectedoption SET /P selectedoption=Type 1, 2, 3, 4, 5 or 99 then press enter REM go to the goto point tag based on the value inside the variable selectedoption IF %selectedOption%==1 GOTO option1 IF %selectedOption%==2 GOTO option2 IF %selectedOption%==3 GOTO option3 IF %selectedOption%==4 GOTO option4 IF %selectedOption%==5 GOTO option5 IF %selectedOption%==6 GOTO option6 IF %selectedOption%==99 exit REM if none of the options then display error message and go to main menu echo The option %selectedOption% is not an available option. echo The possible options are 1, 2, 3, 4 or 99 to exit. PAUSE GOTO MENU REM goto point tag for the option 1 :option1 if not exist %1 MD %1 GOTO question REM goto point tag for the option 2 :option2 if not exist %2.txt echo %1 > %2.txt GOTO question REM goto point tag for the option 3 :option3 copy %1\*.* %2\ GOTO question REM goto point tag for the option 4 :option4 move %1\*%3*.* %2\ GOTO question REM goto point tag for the option 5 :option5 rename %1.txt %2.txt GOTO question REM goto point tag for the option 6 :option6 del *.* if exist %1 RD /s /q %1 goto question REM goto point tag for the question do you want to continue :question REM Reading the user answer in the variable answer SET /P answer=Do you want to continu Y or N REM if Yes go to main menu IF %answer%==y GOTO MENU IF %answer%==Y GOTO MENU REM if no exit IF %answer%==n exit IF %answer%==N exit REM if it s not y or n then ask the question again GOTO question