Hi,  I’ve got a question about the <exec> task – basically, I need the return code that the program returns.

 

I’m running robocopy.exe externally to copy files using the exec task.  Unfortunately, robocopy returns a code of 1 on success.  I’d like to continue running the nant script on return code of 1 (and possibly some other return codes) and fail otherwise. 

 

Using failonerror=false won’t allow me to fail on real errors. 

 

Is there a way to store the return code in a property in the nant script?

 

Thanks in advance for any insight.

 

Paul

Reply via email to