Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

kokloong

Capture Errorlevel

How can I capture the errorlevel or exit code? I'm trying to get the errorlevel for tracing and monitoring as well as documentation for my ftp processes.

I tried with as below in my script but it doesn't echo the error code although there is an error occured
##ftp process##
if %errorlevel% NEQ 0 goto error
 
goto end
:error
echo exit with code %errorlevel%
 
:end
exit