I use with robcopy in my batch file.
I want that if these batch file will run on OS without robcopy installed the error about it WILL appear in the loG file.the error about it is:
‘robocopy’ is not recognized as an internal or external command, operable program or batch file.
my code is:
robocopy Obl\BR "%WEBDIR%\BR" /E /LOG+:%TMPLog% >nul
but this error appear only on the console not appear in TMPLog.
maybe errors of this kind should not appear in logs?
if yes what I can to do?
maybe try and catch if it exist in batch file?!
I’m not at my Windows 7 PC at the moment so can’t really verify this thing, but would logging the output of
robocopyusing the>>redirection be the same as logging with the/LOG+switch? If so, you could redirectstderr(where thenot recognizedmessage is sent) tostdout, andstdoutto your%TMPLog%file, like this: