@echo off
verify # 2>nul
setlocal enableextensions enabledelayedexpansion
if errorlevel 1 goto CANT_SWITCH_ON_EXTENDED_CMD_PROCESSING
call $SQLTRANS "(SettingsOnly)"
if !errorlevel! neq 0 goto ERROR

if "%~0"=="!DROP_PROGRAMMATICS.cmd" goto START
cls

echo PROGRAMMATICS DELETION ():
echo ίίίίίίίίίίίίίίίίίίίίίίίίίί
echo.
echo ώ SQL-server  : !$sql_server!
echo ώ SQL-database: !$sql_database!
echo.
echo ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ
echo ΝΝ STARTING THE SCRIPT(S) ON SQL-SERVER: ΝΝΝ (TRANSLATION CONFIRMATION) ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ
echo.
call $CONFIRMPAUSE.cmd
if !errorlevel! neq 0 goto ERROR

:START
call :DELETE_FILE "programmatics.txt"
if !errorlevel! neq 0 goto FAILURE

call $SQLTRANS.cmd "Drop programmatics\*.sql"
if !errorlevel! neq 0 goto FAILURE

:SUCCESS
if "%~0"=="!DROP_PROGRAMMATICS.cmd" goto FINISH
echo.
echo ΝΝ DROP PROGRAMMATICS ΔΔ SUCCESS ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ
echo ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ
goto FINISH

:FAILURE
if "%~0"=="!DROP_PROGRAMMATICS.cmd" goto ERROR
echo.
echo ΝΝ ## DROP PROGRAMMATICS ΔΔ FAILURE ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ
echo ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ
goto ERROR

::==================================================================================================

:CANT_SWITCH_ON_EXTENDED_CMD_PROCESSING
echo.
echo ## Can not switch on extended command processing.
goto ERROR

::==================================================================================================

:DELETE_FILE
call :RESET_ERROR
if not exist "%~1" goto :EOF
echo.
echo * Deleting file: "%~1" ...
del /q "%~1"
if not exist "%~1" goto :EOF
goto :RETURN_ERROR

::==================================================================================================
:RESET_ERROR
set errorlevel=0
set errorlevel=
goto :EOF
::==================================================================================================
:RETURN_SUCCESS
set errorlevel=0
set errorlevel=
goto :EOF
:RETURN_ERROR
verify # 2>nul
goto :EOF
rem :END_LOCAL_RETURN_SUCCESS
rem endlocal
rem goto RETURN_SUCCESS
rem :END_LOCAL_RETURN_ERROR
rem endlocal
rem goto RETURN_ERROR
::==================================================================================================
:ERROR
if not "%~0"=="!DROP_PROGRAMMATICS.cmd" (
echo 
if not "%$cmd_plain%"=="1" pause )
endlocal
verify # 2>nul
goto :EOF
:FINISH
endlocal
if not "%~0"=="!DROP_PROGRAMMATICS.cmd" (
echo.
if not "%$cmd_plain%"=="1" pause )
call :RESET_ERROR
goto :EOF
::==================================================================================================
