@echo off
if "%1" == "" goto usage
if "%2" == "" goto usage
if "%1" == "server" goto server
if "%1" == "client" goto client

:client
if not exist ..\%2\desc.txt goto client1
echo Running Client for
type ..\%2\desc.txt
echo.
:client1
start vrtestclient "-config=..\%2\client.txt"
goto	done

:server
if "%3"=="load" goto doload
if "%3"=="unload" goto dounload
goto	usage
:doload
if not exist ..\%2\desc.txt goto doload1
echo Loading Server for
type ..\%2\desc.txt
echo.
:doload1
vrtestserver -i -config=..\%2\server.txt -schema=..\%2\schema.txt -storage=..\%2\storage.txt
goto	done
:dounload
if not exist ..\%2\desc.txt goto dounload1
echo Unloading Server for
type ..\%2\desc.txt
echo.
:dounload1
vrtestserver -u "-config=..\%2\server.txt"
goto	done


:usage
echo.
echo usage: vrtest {server -or- client} idnumber [load -or- unload]
echo        load -or- unload is only used for vrtest server
echo.

:done