diff --git a/batch/packdat.bat b/batch/packdat.bat new file mode 100644 index 0000000..8a50e11 --- /dev/null +++ b/batch/packdat.bat @@ -0,0 +1,28 @@ +@echo off +set "retdir=%CD%" + +if "%~1" == "" ( + echo: + echo Usage: packdat foldername [outputname] + exit /b +) + +if not exist "%~1" ( + echo: + echo Error: Folder not found + exit /b +) + +set "datpath=%~dp1" + +if "%~2" == "" ( + set "datfile=%~nx1.dat" +) else ( + set "datfile=%~nx2" +) + +del "%~dp1%datfile%.bak" 2>nul +ren "%~dp1%datfile%" "%datfile%.bak" 2>nul +cd /d "%~dpnx1" +dat2.exe a -r "..\%datfile%" * +cd /d "%retdir%" diff --git a/batch/unpackdat.bat b/batch/unpackdat.bat new file mode 100644 index 0000000..d69e569 --- /dev/null +++ b/batch/unpackdat.bat @@ -0,0 +1,24 @@ +@echo off +set "retdir=%CD%" + +if "%~1" == "" ( + echo: + echo Usage: unpackdat filename [output_folder] + exit /b +) + +if not exist "%~1" ( + echo: + echo Error: DAT file not found + exit /b +) + +if "%~2" == "" ( + set "ofldr=%~n1" +) else ( + set "ofldr=%~nx2" +) + +cd /d "%~dp1" +dat2.exe x -d "%ofldr%" "%~nx1" +cd /d "%retdir%"