Hmm, really weird - can you look at the process monitor log to see if there is a particular error or warning? It should be printing the console log in there rather than the fme job log.
Are you getting the error code as an attribute? Can you test for it?
I am getting this same error.
I am using FME Desktop 2022.1.3.0
The SystemCaller transformer returns an Exit Code of 1. This should signal a failure, even though the files do successfully arrive at the destination folder.
If I replace my robocopy command with gibberish (to deliberately fail) it returns an Exit Code of 1 (this is proper behaviour)
If I run the workbench a second time, the robocopy command will skip copying the files (because robocopy is smart enough to detect that the files are already at the destination folder) and then the SystemCaller will return an Exit Code of 0 (zero) and the workbench succeeds.
So, it is like the SystemCaller is not able to accurately assess wether or not the robocopy command succeeds or fails
I want to clarify that there are no spaces in my filePaths
The error message in the log is a “Failed to execute” error message
SystemCaller_13: Failed to Execute `robocopy \\gisfme\Data\GeoSpatialTech\toSpatialDataMaster\planningCadastre\dcdbQld\statewide L:\spatialDataMaster\planningCadastre\dcdbQld\statewide *.dat *.id *.ind *.map *.tab /purge'
It is not a helpful error message. It does identify the specific Transformer, but does not provide any other useful information.
It says that the robocopy command Failed to Execute, but I can look in the destination folder and confirm that it did in fact succeed
I am looking at this web page
Robocopy | Microsoft Learn
which has this table
Exit (return) codes
Value Description
0 No files were copied. No failure was encountered. No files were mismatched. The files already exist in the destination directory; therefore, the copy operation was skipped.
1 All files were copied successfully.
2 There are some additional files in the destination directory that aren't present in the source directory. No files were copied.
3 Some files were copied. Additional files were present. No failure was encountered.
5 Some files were copied. Some files were mismatched. No failure was encountered.
6 Additional files and mismatched files exist. No files were copied and no failures were encountered meaning that the files already exist in the destination directory.
7 Files were copied, a file mismatch was present, and additional files were present.
8 Several files didn't copy.
Note
Any value equal to or greater than 8 indicates that there was at least one failure during the copy operation.
What this tells me is that a return code of 1 is a genuine success
I am suspicious that SystemCaller is making a bad assumption “If an Exit Code Attribute is specified, it will be set to the executed program's exit code: usually 0 for success and nonzero for failure.”
So when robocopy returns a “1” (meaning success) SystemCaller assumes that “1” indicates a failure and then logs the warning “SystemCaller: Failed to Execute”
It would be nice if SystemCaller did not give false negatives for robocopy