Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a batch file runprog.bat to run a multiple program. Choose any command an

ID: 3831425 • Letter: C

Question

Create a batch file runprog.bat to run a multiple program. Choose any command and make sure to enter your name and date. Give the user these four choices (calculator, word, notepad, and last choice exit). Start with: Disable command echoing Clear screen Display menu option to user Save user selection in an environment Take that option and run the program. Use if command to take the input Make sure you have label for all 4 choices. Clear screen Exit the batch file Test script and print the result

Explanation / Answer

@echo off
title Multiple Choice Menu
:home
cls
echo.
echo Select a task:
echo =============
echo.
echo 1) Open www.mintywhite.com
echo 2) List Temp-files
echo 3) Run IpConfig.exe
echo 4) Run CleanUp.Bat
echo 5) Exit
echo.
set /p web=Type option:
if "%web%"=="1" start www.mintywhite.com
if "%web%"=="2" goto list
if "%web%"=="3" start ipconfig.exe
if "%web%"=="4" Call cleanup.bat
if "%web%"=="5" exit
goto home
:list
echo Listing files from c:windows emp
dir c:windows emp /p /b
Pause
goto home

Save the document as Menu.bat

echo Removing Temp-files from c:windows emp
echo Note! If you get an error, you need to run
echo this with administrative privileges.
cd
cdwindows emp
Del *.tmp /Q
Pause