Verify that the folder exists. I get that error when I point robocopy to a bad folder name. You should also get the "ERROR 3" message.
C:\>robocopy c:\temp\test c:\temp\testpath /log:c:\temp\xxxxxxxxx\rc.log /mir /l
2022/06/03 15:22:19 ERROR 3 (0x00000003) Opening Log File c:\temp\xxxxxxxxx\rc.log
The system cannot find the path specified.
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Friday, June 3, 2022 3:22:19 PM
Source - c:\temp\test\
Dest - c:\temp\testpath\
Files :
Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
ERROR : Invalid Parameter #3 : "/log:c:\temp\xxxxxxxxx\rc.log"