mirror of
https://github.com/sfall-team/Fallout_DAT2.git
synced 2026-07-27 16:53:05 -07:00
Added two batch files for easier packing/unpacking
This commit is contained in:
@@ -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%"
|
||||
@@ -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%"
|
||||
Reference in New Issue
Block a user