Robocopy - ERROR 123 (0x0000007B) - copy directories with spaces
the problem
Using a current PowerShell with tab completion (the shell adds all quotes and spaces) you get the command:
Robocopy.exe 'C:\tmp\source with spaces\' 'C:\tmp\target with spaces\' /e
And executing it you get the error message:
Note that the source and target are “strangly” interpreted. The \'
at the end of the source and target escapes the slash and thus the whole command gets erroneous.
The solution
The solution is super easy, you simply remove the last backslash from source and target.
Robocopy.exe 'C:\tmp\source with spaces' 'C:\tmp\target with spaces' /e