diff --git a/batch/packdat.bat b/batch/packdat.bat index 8a50e11..73eba13 100644 --- a/batch/packdat.bat +++ b/batch/packdat.bat @@ -18,11 +18,15 @@ set "datpath=%~dp1" if "%~2" == "" ( set "datfile=%~nx1.dat" ) else ( - set "datfile=%~nx2" + set "datfile=%~nx2.dat" ) del "%~dp1%datfile%.bak" 2>nul ren "%~dp1%datfile%" "%datfile%.bak" 2>nul cd /d "%~dpnx1" -dat2.exe a -r "..\%datfile%" * +if exist "%retdir%\dat2.exe" ( + "%retdir%\dat2.exe" a -r "..\%datfile%" * +) else ( + dat2.exe a -r "..\%datfile%" * +) cd /d "%retdir%"