With robocopy, exit codes 0 through 7 are considered successful codes so your compare should be LEQ 7. http://ss64.com/nt/robocopy-exit.html & https://support.microsoft.com/en-us/kb/954404
On Sunday, April 17, 2016 at 6:30:00 PM UTC-7, ok999 wrote: > > Thanks, yes the exit code is the cause for this. Had to change my batch > lines like this > > bat "robocopy %cd%${some_path1}${some_path2} ${path_to_node}\\a_folder1 > file1 file2 ^& IF %ERRORLEVEL% LEQ 1 exit 0" > bat "robocopy %cd%${some_path1}${some_path3} ${path_to_node}\\a_folder2 > file1 file2 ^& IF %ERRORLEVEL% LEQ 1 exit 0" > > > On Sun, Apr 17, 2016 at 3:55 PM, Daniel Beck <m...@beckweb.net > <javascript:>> wrote: > >> >> > On 17.04.2016, at 21:13, niristotle okram <nirish...@gmail.com >> <javascript:>> wrote: >> > >> > When the job comes to portion where the above code exist, it appears >> that the first line of robocopy is executed. And it exist. >> >> Robocopy uses non-zero exit codes to indicate what it did rather than >> report a problem/failure -- which is likely how 'bat' interprets those. Try >> something like described here: >> >> https://technet.microsoft.com/en-us/library/ff182367%28WS.10%29.aspx >> >> You may need to use 'exit /b 0' instead if 'exit 0' for Pipeline, not >> sure. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkinsci-use...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/EAEE75D5-1374-4F1C-BFA1-3D0920FE1C9E%40beckweb.net >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Regards > nirish okram > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d4854f6d-b5d9-45db-98e2-72356ccb04b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.