Skip to content

Instantly share code, notes, and snippets.

@DryreL
Created September 4, 2025 15:00
Show Gist options
  • Save DryreL/1aaff82401a2c6ff9602df8bdc30cfe7 to your computer and use it in GitHub Desktop.
Save DryreL/1aaff82401a2c6ff9602df8bdc30cfe7 to your computer and use it in GitHub Desktop.
Unreal Engine PAK File Extractor
@echo off
echo ========================================
echo Unreal Engine PAK File Extractor
echo ========================================
echo.
REM ========================================
REM EDITABLE CONFIGURATION VALUES
REM ========================================
REM Unreal Engine Installation Path (change this to your UE installation path)
set "UE_INSTALL_PATH=D:\Program Files\Epic Games\UE_EDITHERE"
REM PAK File Location (change this to your PAK file path)
set "PAK_FILE=C:\EDITHERE\Content\Paks\EDITHERE-Windows.pak"
REM UCAS File Location (change this to your UCAS file path)
set "UCAS_FILE=C:\EDITHERE\Content\Paks\EDITHERE-Windows.ucas"
REM Extract Folder Location (change this to where you want to extract)
set "EXTRACT_FOLDER=C:\Users\EDITHERE\Desktop\UnrealEnginePakFile_Extracted"
REM ========================================
REM AUTO-CONFIGURED PATHS
REM ========================================
set "UNREALPAK_PATH="
REM Try to find UnrealPak.exe using configured path
set "UNREALPAK_PATH=%UE_INSTALL_PATH%\Engine\Binaries\Win64\UnrealPak.exe"
if exist "%UNREALPAK_PATH%" (
echo Found UnrealPak.exe at: %UNREALPAK_PATH%
) else (
echo ERROR: UnrealPak.exe not found!
echo.
echo Searched location:
echo %UNREALPAK_PATH%
echo.
echo Please check your UE_INSTALL_PATH setting.
echo Current setting:
echo UE_INSTALL_PATH = %UE_INSTALL_PATH%
echo.
pause
exit /b 1
)
echo.
echo Using UnrealPak.exe: %UNREALPAK_PATH%
echo.
REM Create extract folder
if not exist "%EXTRACT_FOLDER%" (
mkdir "%EXTRACT_FOLDER%"
echo Created extract folder: %EXTRACT_FOLDER%
)
echo.
echo ========================================
echo Configuration Summary
echo ========================================
echo UE Install Path: %UE_INSTALL_PATH%
echo PAK File: %PAK_FILE%
echo UCAS File: %UCAS_FILE%
echo Extract Folder: %EXTRACT_FOLDER%
echo.
echo ========================================
echo Extracting PAK Files...
echo ========================================
echo.
REM Extract PAK file
echo Extracting PAK file...
echo Trying without encryption key first...
"%UNREALPAK_PATH%" "%PAK_FILE%" -Extract "%EXTRACT_FOLDER%" -nocompress
if %ERRORLEVEL% NEQ 0 (
echo.
echo Trying with encryption key...
"%UNREALPAK_PATH%" "%PAK_FILE%" -Extract "%EXTRACT_FOLDER%" -cryptokeys="C:\EDITHERE\Config\DefaultCrypto.ini"
)
if %ERRORLEVEL% EQU 0 (
echo.
echo ========================================
echo Extraction Completed Successfully!
echo ========================================
echo.
echo Extracted to: %EXTRACT_FOLDER%
echo.
REM Show extracted file sizes
echo File sizes in extracted folder:
echo ================================
for /f "tokens=3" %%a in ('dir "%EXTRACT_FOLDER%" /s /-c ^| find "File(s)"') do echo Total extracted size: %%a bytes
echo.
REM Show largest files
echo Largest files in extracted folder:
echo ==================================
dir "%EXTRACT_FOLDER%" /s /-c | findstr /v "Directory" | sort /r | more
echo.
) else (
echo.
echo ========================================
echo Extraction Failed!
echo ========================================
echo.
echo Error code: %ERRORLEVEL%
echo.
)
echo.
echo Press any key to open extract folder...
pause >nul
REM Open extract folder
explorer "%EXTRACT_FOLDER%"
echo.
echo Done!
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment