Basta mover o comando chamada para ficar acima do exit ou então sairá antes de chamar.
O que mudar
Isso. . .
exit /b %WINSCP_RESULT%
CALL movefile
pause
Torna-se isso. . .
CALL movefile
pause
exit /b %WINSCP_RESULT%
Script
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\Test\TestLog.log" /ini=nul ^
/command ^
"open sftp://test/ -hostkey=""ssh-dss 2048 xxxxxxxxxxxxxxxxxxxxxxxxx=""" ^
"synchronize remote \Please\Send\Some\Help /Dir/Test" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
CALL movefile
pause
exit /b %WINSCP_RESULT%
Note: You will also want to ensure the batch script file being called actually exists so confirm that is the accurate location from the executing batch script command that calls
movefile
.