@echo off :: Copyright (C) 2013 Prince of Persia modding community :: Version 0.1 (2013-08-05) by Norbert cls echo PR.bat v0.1 (2013-08-05) :: PR echo Enter the path to the PR executable and XML: set /p PR=%~dp0 set PRFULL=%~dp0%PR%\pr.exe echo %PRFULL% if not exist %PRFULL% ( echo PR not found. exit /b 1 ) :: POP echo Where is Prince of Persia (the .DAT files): set /p POP=%~dp0 set POPFULL=%~dp0%POP% :: MODE set /p MODE=Do you want to [E]xport or [I]mport? if "%MODE%"=="e" GOTO EXPORT if "%MODE%"=="E" GOTO EXPORT if "%MODE%"=="i" GOTO IMPORT if "%MODE%"=="I" GOTO IMPORT echo Unknown input. exit /B 1 :EXPORT echo Directory to export to: set /p RES=%~dp0resources set RESFULL=%~dp0resources%RES% %~dp0%PR%\pr.exe -f --resource=%~dp0%PR%\resources.xml --export=%RESFULL% %POPFULL%\*.DAT GOTO END :IMPORT echo Directory to import from: set /p RES=%~dp0resources set RESFULL=%~dp0resources%RES% %~dp0%PR%\pr.exe -f --resource=%~dp0%PR%\resources.xml --import=%RESFULL% %POPFULL%\*.DAT GOTO END :END echo Done.