De acordo com aqui , o Robocopy tem os seguintes bits de código de saída que compõem o código de saída:
0×10 Serious error. Robocopy did not copy any files. This is either a usage error or an error due to insufficient access privileges on the source or destination directories.
0×08 Some files or directories could not be copied (copy errors occurred and the retry limit was exceeded). Check these errors further.
0×04 Some Mismatched files or directories were detected. Examine the output log. Housekeeping is probably necessary.
0×02 Some Extra files or directories were detected. Examine the output log. Some housekeeping may be needed.
0×01 One or more files were copied successfully (that is, new files have arrived).
0×00 No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized.
Apenas adicione instruções if / else que EXIT /B 0
quando o valor de retorno for 1 ou talvez 0 e EXIT /B 1
caso contrário. Mesmo que os arquivos possam ter sido copiados, há algo errado que precisaria de intervenção manual.