@echo off
@echo.

rem program name    : Qmod.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 - MD of RAM allocated for game

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 %1:\mods\%4\%4.txt echo %4 mod was NOT found !
if not exist %1:\mods\%4\%4.txt goto end

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

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

md mods
cd mods

md %4

@echo.

copy %1:\mods\%4\*.* %2:\%3\mods\%4

rem Execute quake from command line.

cd \%3
quake -winmem %5 -game mods\%4 

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