I'm trying to add robocopy to my yml file to help create artifacts. I'm struggling with the syntax, I think there are perhaps special characters or parsing rules for ps: or cmd: that I don't understand.
My goal is to invoke robocopy like this:
cmd: (robocopy XXX YYY) ^& IF %ERRORLEVEL% LEQ 4 exit /B 0
per this article on straightening out robocopy's non-standard return codes:
http://superuser.com/questions/280425/getting-robocopy-to-return-a-proper-exit-code
My specific yml lines are:
before_build:
- cmd: (robocopy /mir . source /xd source external .git packages /NFL /NDL /NJH /nc /ns /np) ^& IF %ERRORLEVEL% LEQ 4 exit /B 0
what I get back in my build logs is:
'3' is not recognized as an internal or external command,
operable program or batch file.
Command exited with code 1