@ECHO OFF
setlocal
set bin_dir=%~dp0
set tool_name=mlxdump
set int_tool_name=%tool_name%_int.exe
set ext_tool_name=%tool_name%_ext.exe
set ext_exp_path=%bin_dir%\%ext_tool_name%
set int_exp_path=%bin_dir%\%int_tool_name%

for %%A in ("%int_exp_path%" "%ext_exp_path%") do (    
    if exist %%A (
        %%A %*
        goto end
    )
)

:err
echo -E- Neither %int_tool_name% nor %ext_tool_name% is installed on this machine
endlocal
exit /b 1

:end
endlocal
exit /b %errorlevel%
