@echo off

set idrive=C
set ipath=CM2

:start

cls
echo                    CHAMPIONSHIP MANAGER 2.
echo.
echo The Campionship Manager 2 Update is about to be applied to the files in:
echo.
echo                           %idrive%:\%ipath%
echo.
echo    P       Proceed
echo.
echo    C       Change destination
echo.
echo    X       Cancel
echo.
echo Please select an option

choice /n /c:PCX
if errorlevel 3 goto end
if errorlevel 2 goto alter
if errorlevel 1 goto begin


:alter
cls
echo                    CHAMPIONSHIP MANAGER 2.
echo.
what ce "Please select a destination drive letter, e.g: D " abcdefghijklmnopqrstuvwxyz
set idrive=%what%
echo.
what s "Please type the name of the destination directory, e.g: CM2 " abcdefghijklmnopqrstuvwxyz_1234567890
set ipath=%what%

if exist %idrive%:\%ipath%\cm2.exe goto start



echo                    CHAMPIONSHIP MANAGER 2.
echo.
echo Championship Manager 2 files were not located in %idrive%:\%ipath%.
echo.
echo Please make sure that the drive and directory are correct.
pause
goto end

:begin
%idrive%:
cd\
cd %ipath%
a:\lha x /c a:\cm2patch.lzh *.*

cls
echo                    CHAMPIONSHIP MANAGER 2.
echo.
echo                 Files updated successfully.
echo.
echo         To run Championship Manager 2 V1.56 type GO.
echo.
goto end




:end
set idrive=
set ipath=
EXIT
