@echo off
setlocal
title Yanyu Save Exporter
if not exist "%~dp0yanyu-export.exe" (
  echo [ERROR] yanyu-export.exe not found.
  pause
  exit /b 2
)
"%~dp0yanyu-export.exe" %*
set "YY_EXIT=%ERRORLEVEL%"
echo.
if not "%YY_EXIT%"=="0" echo Export did not complete. Exit code: %YY_EXIT%
pause
exit /b %YY_EXIT%