echo Setting up the directory for "The Fates of Twinion"
if not exist %1:%6\tsn.prg goto NoINN

godir %1:%6\TWINION CantTwinion
godir %1:%6\TWINION\SAVE CantTwinion
copy ..\twinchar.dat /q
copy ..\automaps.dat /q
godir %1:%6\TWINION CantTwinion
rem del *.*
rem Changed to not kill off-line yserbius installations
del TIMBRE.AD
del SBFM.ADV
del TWINION.DOC
del RESOURCE.038
del RESOURCE.033
del RESOURCE.034
del RESOURCE.022
del RESOURCE.037
del RESOURCE.024
del RESOURCE.026
del RESOURCE.040
del TWINCHAR.DAT
del AUTOMAPS.DAT
del IMAGES.DAT
del PALETTE.DAT
del WALLS.DAT
del HELP.DAT
del MAIN.TSU
del ADLIB.ADV
del MT32MPU.ADV
del AD06.XMI
del ANIM_SEQ
del ADTIMBRE.GTL
del AUTOMAPS.NEW
del TWINCHAR.NEW
del AD00.XMI
del AD02.XMI
del AD03.XMI
del AD01.XMI
del AD05.XMI
del AD12.XMI
del RESOURCE.039
del RESOURCE.031
del MT02.XMI
del MT04.XMI
del MT05.XMI
del MT06.XMI
del MT12.XMI
del MT13.XMI
del MT03.XMI
del FX10.XMI
del FX11.XMI
del FX12.XMI
del FX13.XMI
del FX14.XMI
del FX15.XMI
del FX16.XMI
del FX17.XMI
del FX18.XMI
del FX19.XMI
del FX20.XMI
del FX21.XMI
del FX22.XMI
del FX23.XMI
del FX24.XMI
del FX25.XMI
del FX26.XMI
del FX27.XMI
del FX28.XMI
del FX29.XMI
del FX30.XMI
del FX31.XMI
del FATES.EXE
del AD13.XMI
del AD04.XMI
del MT00.XMI
del MT01.XMI
del RESOURCE.025
del RESOURCE.009
del RESOURCE.002
del RESOURCE.003
del RESOURCE.004
del RESOURCE.005
del RESOURCE.006
del RESOURCE.007
del RESOURCE.008
del RESOURCE.010
del RESOURCE.011
del RESOURCE.012
del RESOURCE.013
del RESOURCE.014
del RESOURCE.015
del RESOURCE.016
del RESOURCE.017
del RESOURCE.018
del RESOURCE.019
del RESOURCE.023
del RESOURCE.020
del RESOURCE.021
del RESOURCE.036
del RESOURCE.001
del RESOURCE.035
del RESOURCE.032
del RESOURCE.029
del RESOURCE.027
del RESOURCE.028
del RESOURCE.030
del TWGENN.EXE


rem Is there space?
space %1: 4000 NoSpace
if errorlevel 1 goto NoSpace

echo Copying Twinion Files...
defuse %2 %1 part %6\TWINION

echo UnCompressing "The Fates of Twinion"
puff /D _*.*
copy save\*.dat /q

copy %2:TWPatch\*.* /q
if exist _*.* puff /D _*.*

copy twinion.doc ..

godir %1:%6

%2:doclst DOC.LST Twinion.doc
rem echo Twinion.doc>>..\doc.lst

cls
echo Installation complete.
echo 
echo 
echo Type "cd %6"
echo      "INN"
echo   to run The ImagiNation Network
echo 
end

:NoSpace
cls
echo There is not enough space on %1: to install Twinion
echo 4.0 Megabytes are required. Delete some unused files.
pause
end

:NoINN
Alert Unable to find an existing INN installation at %1:%6
cls
end

:CantTwinion
Alert Unable to create %1:%6\TWINION
end
