
@echo off
@chcp 65001
CD /D "%~dp1"
cls


set SrcExt0=tbl
set DestExt0=json

set Src0=%~nx1
If Not Exist "%Src0%\*.%SrcExt0%" (echo. && echo  [ %Src0% ] Not Found. && echo. && pause && Goto End)

set DestPath=%~dp1
set Dest0=%Src0%-TXT

set exe=%~dp0_exe\node.exe
set ScriptJS=%~dp0_exe\pkg_tool\tbl_codec.js
set Opt=decode -f -t "%~dp0_exe\pkg_tool\xanadu_tbls.conf" -o




for %%f in ("%Src0%\*.%SrcExt0%") do (
If Not Exist "%Dest0%" mkdir "%Dest0%"

"%exe%" "%ScriptJS%" %Opt% "%Dest0%" "%%f"
echo.

If Not Exist "%Dest0%\%%~nf.%DestExt0%" pause
)



:End
REM  pause
