ECHO OFF
ECHO Recombining final level archives...
FOR %%L IN (8) DO (
    FOR %%D IN (..\GameDataFolder\level%%L_Final) DO (
        IF EXIST %%D (
            IF EXIST ..\..\GameDataFolder\level0_Final.sep (
                OniSplit.exe -import:sep %%D %%D.dat
            ) ELSE (
                OniSplit.exe -import:nosep %%D %%D.dat
            )
        )
    )
)