Topic
  • 2 replies
  • Latest Post - ‏2014-04-04T15:54:59Z by juriggs
juriggs
juriggs
9 Posts

Pinned topic cdftp+ -e command line parameter

‏2014-03-12T19:28:28Z |

Here's the documentation:

-e Terminates Sterling Connect:Direct FTP+ on certain errors. Specifies to exit 
on errors after retries have been exhausted. Enables determining success or 
failure easily when Sterling Connect:Direct FTP+ is used in simple .bat or .sh 
scripts. Failure is indicated by non-zero return code or error level. 

Here's my question:

what errors is this talking about?

How do I use the return code in my .bat file? Is it in the CDFA.log file, and I have to parse it out? Or is there an easier way?

Thanks,

Justin

 

 

  • VolkerFriedrich
    VolkerFriedrich
    178 Posts
    ACCEPTED ANSWER

    Re: cdftp+ -e command line parameter

    ‏2014-03-25T17:11:42Z  

    One example for an error is that cdftp was unable to connect to the remote side. Other examples are failed put or get commands.

    When cdftp terminates in error, it simply sets the ERRORLEVEL, which you can then examine as usual in your batch file. Here is a simple example:

    cdftp -e -s:ftpscript.txt
    if ERRORLEVEL 1 echo An error has occurred

  • VolkerFriedrich
    VolkerFriedrich
    178 Posts

    Re: cdftp+ -e command line parameter

    ‏2014-03-25T17:11:42Z  

    One example for an error is that cdftp was unable to connect to the remote side. Other examples are failed put or get commands.

    When cdftp terminates in error, it simply sets the ERRORLEVEL, which you can then examine as usual in your batch file. Here is a simple example:

    cdftp -e -s:ftpscript.txt
    if ERRORLEVEL 1 echo An error has occurred

  • juriggs
    juriggs
    9 Posts

    Re: cdftp+ -e command line parameter

    ‏2014-04-04T15:54:59Z  

    One example for an error is that cdftp was unable to connect to the remote side. Other examples are failed put or get commands.

    When cdftp terminates in error, it simply sets the ERRORLEVEL, which you can then examine as usual in your batch file. Here is a simple example:

    cdftp -e -s:ftpscript.txt
    if ERRORLEVEL 1 echo An error has occurred

    That's perfect... thank you very much.