echo off
if %1p1==p1 goto parmerror
if %2p2==p2 goto parmerror
echo Starting E! installation
echo Source drive: %1
echo Destination drive : %2
echo Creating %2\E!...
mkdir %2\e!
echo Testing %2\E!...
echo test > %2\e!\test
if not exist %2\e!\test goto direrror
del %2\e!\test
%2
chdir \e!
if exist %1e!disk1.exe goto next1
echo Please insert disk #1 in drive %1
pause
:next1
echo Copying files from %1 to %2\E!...
copy %1e!patch.exe
copy %1e!patch.doc
copy %1read.it
copy %1register.txt
%1e!disk1
if not exist %1e!disk2.exe goto nextdisk
%1e!disk2
goto ok
:nextdisk
echo Please insert disk #2 in drive %1
pause
if not exist %1e!disk2.exe goto diskerror
%1e!disk2
goto ok
:parmerror
echo INSTALL syntax : Install X: Y:
echo                  x: drive from where E! diskettes are read
echo                  y: drive where you want to install E!
goto end
:direrror
echo Error while creating %2\E!
goto end
:diskerror
echo Wrong diskette in drive %1
goto end
:ok
echo E! has been installed in %2\E!.
:end
