@call "%~dp0config.bat" 0 > nul @call "%~dp0config2.bat" > nul echo %~n1 sqlcmd.exe -S %DEST_SERVER% -d %DEST_DATABASE% -U %DEST_USER% -P %DEST_PASSWORD% -b -i %~1 -o ..\logs\%~n1.sql.log if %errorlevel% neq 0 ( type ..\logs\%~n1.sql.log )