I am trying to run robocopy (Windows robust copy) in a shell script (which is actually a git hook). It works fine until I add the option /XO
.
So the command:
robocopy source destination a.txt
works correctly in .bat and .sh file.
But the command
robocopy source destination a.txt /XO
fails in .sh with error:
ERROR : Invalid Parameter #3 : "C:/Program Files/Git/XO"
whereas it works correctly in bat file.
So the problem is with the /XO
option to robocopy; more specifically, the way shells script passes the parameter to robocopy.
Kindly suggest a solution.