This is a *.bat file I wrote by following the example in a book, but it gives an error when I run it.
Please help me take a look
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto mem
if errotlevel 1 goto end
:defrag
c:\windows\defrag.exe
goto end
:mem
mem
goto end
:end
echo good bye
After running it, choosing d or m is fine, but choosing e gives the result for choosing d
Please help me take a look
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag
if errorlevel 2 goto mem
if errotlevel 1 goto end
:defrag
c:\windows\defrag.exe
goto end
:mem
mem
goto end
:end
echo good bye
After running it, choosing d or m is fine, but choosing e gives the result for choosing d


