::------------------------------------------
::          script by BME/ILMHB 2012
::------------------------------------------
@ECHO OFF
CLS

::------------------------------------------
SET project=BAITD1

::------------------------------------------
IF NOT EXIST BARF.exe GOTO nobarf
IF NOT EXIST %project% GOTO nofolder
IF EXIST !BACKUP GOTO yesfolder
MKDIR !BACKUP

IF NOT EXIST TILES015.art GOTO t16
COPY TILES015.art !BACKUP
:t16
IF NOT EXIST TILES016.art GOTO t17
COPY TILES016.art !BACKUP
:t17
IF NOT EXIST TILES017.art GOTO t18
COPY TILES017.art !BACKUP
:t18
IF NOT EXIST TILES018.art GOTO t19
COPY TILES018.art !BACKUP
:t19
IF NOT EXIST TILES019.art GOTO t20
COPY TILES019.art !BACKUP
:t20
COPY SURFACE.dat !BACKUP

CD %project%
  COPY TILES015.art ..
  COPY TILES016.art ..
  COPY TILES017.art ..
  COPY TILES018.art ..
  COPY TILES019.art ..
  COPY BAITD1.ini ..
  COPY BAITD1.map ..
  COPY SURFACE.dat ..
  CD ..

::------------------------------------------
BLOOD -ini BAITD1.ini
::------------------------------------------
CLS

DEL BAITD1.ini
DEL BAITD1.map
DEL TILES016.art
DEL TILES017.art
DEL TILES018.art
DEL TILES019.art

CD !BACKUP
  COPY *.* ..
  DEL *.*
  CD ..
RD !BACKUP

GOTO done

::-----------------<MESSAGES>-----------------
:nobarf
ECHO ERROR - BARF.EXE needs to be in the main Blood folder!
GOTO abort

:nofolder
ECHO ERROR - Folder  %project%  does not exist!
GOTO abort

:yesfolder
ECHO ERROR - Folder  !BACKUP  already exist!
GOTO abort

:abort
ECHO Installation aborted.
GOTO end

:done
CLS
ECHO Installer by BME/ILMHB 2012
ECHO.
ECHO ALL FILES RESTORED!
GOTO end
::------------------------------------

:end
ECHO.