@echo off
setlocal enabledelayedexpansion
pushd %0\..


set DIR=_ECEBackup\

if Exist "Skyrim.esm" goto Main
echo It must be placed in the skyrim\data\ folder.
echo このバッチファイルはスカイリムフォルダのDataフォルダに入れてください。
pause
exit

:Main

echo F | xcopy /I /Y "CharacterMakingExtender.esp" "%DIR%CharacterMakingExtender.esp"
echo F | xcopy /I /Y "EnhancedCharacterEdit.esp" "%DIR%EnhancedCharacterEdit.esp"
echo F | xcopy /I /Y "USKP Patcher for RaceCompatibility.esp" "%DIR%USKP Patcher for RaceCompatibility.esp"
echo F | xcopy /I /Y "RaceCompatibility.bsa" "%DIR%RaceCompatibility.bsa"
echo F | xcopy /I /Y "RaceCompatibility.esm" "%DIR%RaceCompatibility.esm"

echo F | xcopy /I /Y "Interface\exported\racesex_menu.gfx" "%DIR%Interface\exported\racesex_menu.gfx"
echo F | xcopy /I /Y "Interface\fontconfig.txt" "%DIR%Interface\fontconfig.txt"
echo F | xcopy /I /Y "Interface\translations\CharacterMakingExtender_english.txt" "%DIR%Interface\translations\CharacterMakingExtender_english.txt"
echo F | xcopy /I /Y "Interface\translations\CharacterMakingExtender_german.txt" "%DIR%Interface\translations\CharacterMakingExtender_german.txt"
echo F | xcopy /I /Y "Interface\translations\CharacterMakingExtender_japanese.txt" "%DIR%Interface\translations\CharacterMakingExtender_japanese.txt"

echo D | xcopy /E /I /Y "meshes\CharacterMakingExtender" "%DIR%meshes\CharacterMakingExtender"

echo D | xcopy /E /I /Y "meshes\actors\character\ygNord" "%DIR%meshes\actors\character\ygNord"
echo D | xcopy /E /I /Y "textures\Actors\character\Enhanced" "%DIR%textures\Actors\character\Enhanced"
echo D | xcopy /E /I /Y "Textures\CharacterMakingExtender\commonTriRaces" "%DIR%Textures\CharacterMakingExtender\commonTriRaces"

echo D | xcopy /I /Y "meshes\actors\character\character assets\beards" "%DIR%meshes\actors\character\character assets\beards"
echo D | xcopy /I /Y "meshes\actors\character\character assets\faceparts" "%DIR%meshes\actors\character\character assets\faceparts"
echo D | xcopy /I /Y "meshes\actors\character\character assets\mouth" "%DIR%meshes\actors\character\character assets\mouth"

echo F | xcopy /I /Y "meshes\actors\character\character assets\eyesfemalechargen.tri" "%DIR%meshes\actors\character\character assets\eyesfemalechargen.tri"
echo F | xcopy /I /Y "meshes\actors\character\character assets\eyesMaleChargen.tri" "%DIR%meshes\actors\character\character assets\eyesMaleChargen.tri"
echo F | xcopy /I /Y "meshes\actors\character\character assets\femalehead.nif" "%DIR%meshes\actors\character\character assets\femalehead.nif"
echo F | xcopy /I /Y "meshes\actors\character\character assets\femaleheadchargen.tri" "%DIR%meshes\actors\character\character assets\femaleheadchargen.tri"
echo F | xcopy /I /Y "meshes\actors\character\character assets\FemaleHeadraces.tri" "%DIR%meshes\actors\character\character assets\FemaleHeadraces.tri"
echo F | xcopy /I /Y "meshes\actors\character\character assets\maleHeadCustomizations.tri" "%DIR%meshes\actors\character\character assets\maleHeadCustomizations.tri"

echo F | xcopy /I /Y "Meshes\actors\character\character assets\skeletonbeast.nif" "%DIR%Meshes\actors\character\character assets\skeletonbeast.nif"
echo F | xcopy /I /Y "Meshes\actors\character\character assets\skeleton.nif" "%DIR%Meshes\actors\character\character assets\skeleton.nif"

echo F | xcopy /I /Y "Meshes\actors\character\character assets female\skeletonbeast_female.nif" "%DIR%Meshes\actors\character\character assets female\skeletonbeast_female.nif"
echo F | xcopy /I /Y "Meshes\actors\character\character assets female\skeleton_female.nif" "%DIR%Meshes\actors\character\character assets female\skeleton_female.nif"

echo F | xcopy /I /Y "Scripts\zzcharactermakingextenderscript.pex" "%DIR%Scripts\zzcharactermakingextenderscript.pex"
echo F | xcopy /I /Y "Scripts\zzcharactermakingextenderloadscript.pex" "%DIR%Scripts\zzcharactermakingextenderloadscript.pex"
echo F | xcopy /I /Y "Scripts\RegisterCustomRaceScript.pex" "%DIR%Scripts\RegisterCustomRaceScript.pex"
echo F | xcopy /I /Y "Scripts\GenericRaceController.pex" "%DIR%Scripts\GenericRaceController.pex"

echo F | xcopy /I /Y "Scripts\Source\zzCharacterMakingExtenderScript.psc" "%DIR%Scripts\Source\zzCharacterMakingExtenderScript.psc"
echo F | xcopy /I /Y "Scripts\Source\zzCharacterMakingExtenderLoadScript.psc" "%DIR%Scripts\Source\zzCharacterMakingExtenderLoadScript.psc"
echo F | xcopy /I /Y "Scripts\Source\GenericRaceController.psc" "%DIR%Scripts\Source\GenericRaceController.psc"

echo F | xcopy /I /Y "SKSE\Plugins\CharacterMakingExtender_plugin.dll" "%DIR%SKSE\Plugins\CharacterMakingExtender_plugin.dll"

endlocal


echo Done. Dataフォルダ内のECE関連ファイルをバックアップしました。
pause


