goto end
:ext
: =====================EXT====================
if "%2"=="" goto NoPath
if exist %3 goto WantExtCab
if exist %1.cab goto ExtCab
if exist %1 goto ExtFullName
:ExtCab
if exist %1 for %%I IN (%1) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
if exist %1.cab for %%I IN (%1.cab) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
set ext=ExtCab
goto end
:ExtFullName
if exist %1 for %%I IN (%1) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
if exist %1.cab for %%I IN (%1.cab) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
set ext=ExtFullName
goto end
:WantExtCab
if exist %1 for %%I IN (%1) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
if exist %1.cab for %%I IN (%1.cab) do extract /y /e /l %2\ %%I %3 %4 %5 %6 %7 %8 %8 %9 %10 %10 %11 %12 %13 >nul
set ext=WantExtCab
goto end
:NoPath
if exist %1.cab for %%I IN (%1.cab) do extract /y /e /l ext %%I >nul
if exist %1 for %%I IN (%1) do extract /y /e /l ext %%I >nul
set ext=NoPath
goto end
:error
echo.
echo Not exist %1 files or Invalid directory ...
echo.
goto end