@echo off setlocal EnableExtensions set "REN_DIR=%~dp0" for %%I in ("%REN_DIR%..") do set "PROJ_ROOT=%%~fI" set "CONFIG_LOADER=%REN_DIR%ConfigLoader.ps1" set "CONFIG_PATH=%REN_DIR%config.json" if not exist "%CONFIG_LOADER%" ( echo [ERROR] ConfigLoader.ps1 not found next to ZipSeqArchv.bat. echo Please run UpdateProjectBatches.ps1 to refresh helper files. exit /b 1 ) if not exist "%CONFIG_PATH%" ( echo [ERROR] config.json not found next to ZipSeqArchv.bat. echo Please run UpdateProjectBatches.ps1 to refresh helper files. exit /b 1 ) for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command ^ "Set-StrictMode -Version Latest; $loader = Resolve-Path -LiteralPath '%CONFIG_LOADER%' -ErrorAction Stop; . $loader.Path; $pyPath = Join-Path (Get-StructDirectory) 'zip_sequences.py'; if (-not (Test-Path -LiteralPath $pyPath)) { throw \"zip_sequences.py not found at $pyPath\" }; Write-Output $pyPath"`) do set "PY_SCRIPT=%%I" if not defined PY_SCRIPT ( echo [ERROR] Unable to resolve zip_sequences.py path from config. exit /b 1 ) pushd "%PROJ_ROOT%" >nul 2>&1 python "%PY_SCRIPT%" --verbose %* set "ERR=%ERRORLEVEL%" if not "%ERR%"=="0" ( echo Failed to update render sequence archives (exit code %ERR%). ) popd >nul 2>&1 exit /b %ERR%