Trying to use robocopy command to move a file from one place to another. I've tested the command on windows and it executes fine. When I run it via a system command I get an error.
Trying to run:
robocopy "\\myuncpath\share\dir1" "\\myuncpath\share\dir2" test.xlsx /MOV
ERROR: Return value for program was a non-zero value :
I'm using the options following the /MOVE to keep it silent
I've tried adding ^& IF %ERRORLEVEL% LEQ 1 exit 0 after the options b/c I saw in a post that it returns a 1 even if it was successful.
ROBOCOPY Exit Codes
The return code from Robocopy is a bitmap, defined as follows:
Hex Decimal Meaning if set
0×00 0 No errors occurred, and no copying was done.
The source and destination directory trees are completely synchronized.
0×01 1 One or more files were copied successfully (that is, new files have arrived).