@echo off
setlocal enableDelayedExpansion
set x=1

:Przenoszenie wypakowanych plikow:
rmdir /s /Q "%~dp0Gra"
rmdir /s /Q "%~dp0NCA"
mkdir "%~dp0Gra"
mkdir "%~dp0NCA"
move "%~dp0Temp\Section0" "%~dp0Gra\exefs"
move "%~dp0Temp\Section1" "%~dp0Gra\romfs"
move "%~dp0Temp\Section2" "%~dp0Gra\logo"
copy /B /Y "%~dp0Temp\Update\1eb67642964c1ac1086ef66d5f95b328.nca" "%~dp0NCA\1eb67642964c1ac1086ef66d5f95b328.nca"
copy /B /Y "%~dp0Temp\Update\87e6eb2da52dd8ac1aec6d20e6d826b9.nca" "%~dp0NCA\87e6eb2da52dd8ac1aec6d20e6d826b9.nca"

:Modyfikacja plikow gry:
"%~dp0Tools\ffxsw-vbf.exe" -l -r "%~dp0PATCH" "%~dp0Gra\romfs\FFXII_TZA.vbf"
copy /B /Y "%~dp0filesizetables\nx\filesizetable_nx_us.fst" "%~dp0Gra\romfs\filesizetables\nx\filesizetable_nx_us.fst"
echo 2 etap z 4 zakonczony
timeout 5
cls