@echo off
@echo.

rem program name    : Qbothdel.bat 
rem program version : 1.01
rem last update     : 9/96 dz
rem program author  : buddie

rem % parameter definitions
rem ------------------------
rem %1 - CD Drive
rem %2 - Hard Drive 
rem %3 - Ekauq sub-directory
rem %4 - Mod name
rem %5 - Map filename

rem Check for valid path
if not exist %2:\%3\quake.exe echo Invalid Ekauq sub-directory. 
if not exist %2:\%3\quake.exe echo Please enter correct Ekauq path in 
if not exist %2:\%3\quake.exe echo User Option's box and try again.
if not exist %2:\%3\quake.exe echo ( i.e. quake )
if not exist %2:\%3\quake.exe goto end

rem Check for valid mod name
if not exist %2:\%3\mods\%4\%4.txt echo %4 mod was NOT found !
if not exist %2:\%3\mods\%4\%4.txt goto end

rem Check for valid map name
if not exist %2:\%3\id1\maps\%5.bsp echo %5 map was NOT found !
if not exist %2:\%3\id1\maps\%5.bsp goto end

rem Change to user's hard drive.
%2:

rem Change to user's Ekauq mod sub-directory.
cd\%3\mods\%4
@echo.

del *.txt
if exist progs.dat del progs.dat
if exist config.cfg del config.cfg
if exist *.sav del *.sav

@echo %4 mod was successfully removed from your hard drive. 

cd ..
rd %4

rem Change to user's Ekauq maps sub-directory.
cd\%3\id1\maps

del %5.bsp
@echo %5 map was successfully removed from your hard drive. 

:end
@echo.
@echo You may now close this window.
