
@echo off
chcp 65001>nul
cd /d "%~dp0"


set Src0=%~nx1
If Not Exist "%Src0%" echo. &&echo  [ Src0:%Src0% ] Not Found. &&echo. &&pause &&goto End
If Not Exist "%Src0%\EQUIP.tbl" If Not Exist "%Src0%\Object.tbl" echo. &&echo  [ Src0:%Src0% ] Not Found. &&echo. &&pause &&goto End

set Dest0=%Src0%.TXT
REM  If Exist "%Dest0%" echo. &&echo  [ Dest0:%Dest0% ] Aleady Existed. &&echo. &&pause &&goto End


set exePATH=%~dp0_exe

set qbms_exe=%exePATH%\quickbms.exe
If Not Exist "%qbms_exe%" echo. &&echo  [ _exe\quickbms.exe ] Not Found. &&echo. &&pause &&goto End



REM  -------------------------------------------------

If Exist "%Src0%\EQUIP.tbl" "%qbms_exe%" -D -o -Y "%exePATH%\Xanadu_Next-TBL_extTXT-EQUIP.bms" "%Src0%\EQUIP.tbl" "%Dest0%"

If Exist "%Src0%\Object.tbl" "%qbms_exe%" -D -o -Y "%exePATH%\Xanadu_Next-TBL_extTXT-Object.bms" "%Src0%\Object.tbl" "%Dest0%"

REM  -------------------------------------------------



:End
REM  
echo. &&pause
