@echo off
echo [msg1]
"[exe]" -h[srv] -u[user] -p[pswd] -P[port] [db]  [table] --skip-triggers >> "[file]"

IF errorlevel 1 GOTO Error
GOTO Ok

:Error
echo.
echo [error]
del [file]
GOTO Exit

:Ok
rem cls
echo [ok]

:Exit

[debug] pause..