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


set SrcExt0=pkg
set DestExt0=

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

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

set exe=%~dp0_exe\node.exe
set ScriptJS=%~dp0_exe\pkg_tool\pkg_tool.js
set Opt=unpack -v -o



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

"%exe%" "%ScriptJS%" %Opt% "%Dest0%\%%~nf" "%%f"
echo.

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



:End
REM  pause
