in reply to Re: Error checking on system SCP
in thread Error checking on system SCP

I've made the change you suggested, thanks.

Unfortunately, it's still returning zero every time.

Replies are listed 'Best First'.
Re^3: Error checking on system SCP
by ikegami (Patriarch) on Dec 14, 2005 at 19:45 UTC

    Could it be that your scp doesn't return an error code?

    In Windows, I'd check it as following:

    >copy nul nul 1 file(s) copied. >if errorlevel 1 echo ** >copy bad args The system cannot find the file specified. >if errorlevel 1 echo ** **

    As you can see, copy returns an error code >= 1 when it fails. Does your scp do the same?