REM Create a temporary file list with full paths
dir /s /b /a-d PAYDAY3\* > temp_filelist.txt

REM Initialize filelist.txt
echo. > filelist.txt

REM Define the general suffix and specific suffixes
set general_suffix="../../../PAYDAY3/Content/Mods/AnimatedEscapeVanMod/Texture/"
set display_suffix="../../../PAYDAY3/Content/Mods/AnimatedEscapeVanMod/"
set meta_suffix="../../../PAYDAY3/Content/Mods/ModMeta/"

REM Read each line from temp_filelist.txt and format it
for /f "delims=" %%i in (temp_filelist.txt) do (
    set "filename=%%~nxi"
    call :process_line "%%i" "%%filename%%"
)

REM Run UnrealPak with the updated filelist.txt
..\data\Engine\Tool\unrealpak\UnrealPak.exe "..\..\..\..\_multi\yourmodname_van_anim.pak" -create=..\..\..\..\_multi\filelist.txt -compress

REM Cleanup temporary file
del temp_filelist.txt
del filelist.txt

echo FINISH!
pause
goto :eof

:process_line
setlocal
set "filepath=%~1"
set "filename=%~2"

REM Check for specific filenames and assign the appropriate suffix
if "%filename%"=="AnimateEscapeVan.uasset" set suffix=%display_suffix%
if "%filename%"=="AnimateEscapeVan.uexp" set suffix=%display_suffix%
if "%filename%"=="AnimatedEscapeVanModMeta.uasset" set suffix=%meta_suffix%
if "%filename%"=="AnimatedEscapeVanModMeta.uexp" set suffix=%meta_suffix%
if not defined suffix set suffix=%general_suffix%

REM Write the formatted line to filelist.txt
echo "%filepath%" %suffix% >> filelist.txt

endlocal
goto :eof