Capturing Error Code 4 into my flag file
Hi Martin,
This is SaraDevi and i am new to the Winscp Batch script.Please help and really appreciate it.
I am using the below script to send a flag when script returns error codes.
if %ERRORLEVEL% equ 1 goto error
if %ERRORLEVEL% equ 0 goto success
:succes
echo
"Success" > "\\hqolymappim3q\Informatica\PowerCenter Server\FlagFiles\LaborReplacementSystem\EarningLeaveBalanceExport\HRMSEarningLeaveBalanceExportFileDownloadedSuccessFully.txt"
exit /b 0
:end
:error
echo "Error" > "\\hqolymappim3q\Informatica\PowerCenter Server\FlagFiles\LaborReplacementSystem\EarningLeaveBalanceExport\HRMSEarningLeaveBalanceExportFileNotDownloaded.txt"
exit /b 1
:end
But it didnt write the HRMSEarningLeaveBalanceExportFileNotDownloaded.txt even though script returns exit code 1.
Could you please help if i am doing anything wrong.
Also please find the log attached to the post and do let me know if i am doing anything wrong.
Thanks,
SaraDevi
This is SaraDevi and i am new to the Winscp Batch script.Please help and really appreciate it.
I am using the below script to send a flag when script returns error codes.
if %ERRORLEVEL% equ 1 goto error
if %ERRORLEVEL% equ 0 goto success
:succes
echo
"Success" > "\\hqolymappim3q\Informatica\PowerCenter Server\FlagFiles\LaborReplacementSystem\EarningLeaveBalanceExport\HRMSEarningLeaveBalanceExportFileDownloadedSuccessFully.txt"
exit /b 0
:end
:error
echo "Error" > "\\hqolymappim3q\Informatica\PowerCenter Server\FlagFiles\LaborReplacementSystem\EarningLeaveBalanceExport\HRMSEarningLeaveBalanceExportFileNotDownloaded.txt"
exit /b 1
:end
But it didnt write the HRMSEarningLeaveBalanceExportFileNotDownloaded.txt even though script returns exit code 1.
Could you please help if i am doing anything wrong.
Also please find the log attached to the post and do let me know if i am doing anything wrong.
Thanks,
SaraDevi