echo off
REM this program installs CAMPAIGN 2 from floppies to %1\CAMP2

if "%1"=="" goto NOTOK1
goto OK1
:NOTOK1
echo ERROR: No drive specified, type INSTALL *: where * is the drive
echo	    to install to (usually C).
goto End
:OK1

REM  this installs new CAMP2 subdirectory; errorlevel 0 means success
MD %1\CAMP2
if errorlevel 0 goto CopyFiles
cls
echo Error creating %1\CAMP2 subdirectory, do not use INSTALL program.
echo You must install CAMPAIGN 2 manually. Sorry.
goto End

:CopyFiles
REM  this copies files from floppies in to %1\CAMP2

:ReqDisk1
if EXIST CAMP2.RNC goto NoDisk1
cls
echo Please Change To Floppy Directory eg. A:
echo Then Type INSTALL Followed By Drive eg. C:
goto end
:NoDisk1
copy *.RNC %1\CAMP2
PP e %1\CAMP2\CAMP2.RNC -t %1\CAMP2
if EXIST %1\CAMP2\CAMP2.EXE goto Erasezip1
goto end

:Erasezip1
del %1\CAMP2\CAMP2.RNC

mkdir %1\CAMP2\TRAINING
mkdir %1\CAMP2\REALWARS
mkdir %1\CAMP2\INTRO
PP e %1\CAMP2\INTRO.RNC -t %1\CAMP2\INTRO
PP e %1\CAMP2\TRAINING.RNC -t %1\CAMP2\TRAINING
PP e %1\CAMP2\REALWARS.RNC -t %1\CAMP2\REALWARS
del %1\CAMP2\*.RNC
%1
CD %1\CAMP2
cls
echo Campaign 2 now installed in %1\CAMP2
echo Type CAMP2 then return to start...
:End
