echo off
cls
echo When the Auto Installers Load, please ensure that your rFactor root directory 
echo (should be c:\Program File\rFactor) is selcted before you continue.   
echo If you have not ran this file from you rFactor your root directory, these 
echo installers will not work and you need to press ctrl-C Now! If you have not 
echo read the readme file please also press ctrl-c now! or
pause

rem FolderSetup makes all directories in the Rfactor Directory that are required for this installation.
call c:\Progra~1\rFactor\FolderSetup.exe

rem copying existing files from V8Fator that are required
xcopy "c:\Program Files\rFactor\GameData\Vehicles\V8Factor" "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07" /e

rem Removing unwanted files
rd /s /q "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Adrenalin Factor"

rem copying existing files from V8Fator that are required
xcopy "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Ford\Paul Cruickshank Racing" "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Ford\Team Kiwi Racing" /e
xcopy "c:\Program Files\rFactor\GameData\Sounds\V8Factor" "c:\Program Files\rFactor\GameData\Sounds\V8Factor07" /e
xcopy "c:\Program Files\rFactor\MovieFiles\V8Factor" "c:\Program Files\rFactor\MovieFiles\V8Factor07" /e

rem Renaming Team Files to suit new numbering and drivers
rename "c:\Program Files\rFactor\MovieFiles\V8Factor07\V8Factor.bik" V8Factor07.bik
rename "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Ford\Paul Cruickshank Racing\PCR_20*.*" PCR_111*.*
rename "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Ford\Stone Brothers Racing\SBR_01*.*" SBR_09*.*
rename "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Holden\Supercheap Auto Racing\SAR_51*.*" SAR_20*.*
rename "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Holden\Tasman Motorsport\TAS_23*.*" TAS_51*.*
rename "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Holden\Toll HSV Dealer Team\HSV_15*.*" HSV_01*.*
rename "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Ford\Team Kiwi Racing\PCR_20*.*" TKR_021*.*

rem Removing Team Kiwi Holden Car
rd /s /q "c:\Program Files\rFactor\GameData\Vehicles\V8Factor07\Teams_Holden\Team Kiwi Racing"

rem V8Factor07Setup installs required files to run the mod
call c:\progra~1\rFactor\V8Factor07Setup.exe
