Hello,
I have created on bat file, that contains a lot of logic among them there is one command which I have to run to complete the whole logic of bat file. the command is robocopy with a timestamp.
MY Commands:
@echo off 
echo BUILD_SOURCESDIRECTORY contents: 
@dir %BUILD_SOURCESDIRECTORY% echo Over and out. 
@For /F "Tokens=1-5Delims=/: " %%G In (     '""%__AppDir__%Robocopy.exe" \: . /NJH 
/L|"%__AppDir__%find.exe" " 123""' )Do @Set "bdate=[%%I-%%H-%%G]-[%%J-%%K]" 
ROBOCOPY "%BUILD_SOURCESDIRECTORY%\Resources" "\\servername\Copy\%bdate%" /V
Note:
- I know there is one task in Azure DevOps Server 2019 for robocopy "Windows Machine File Copy task" but I don't want to separate tasks. 
- I know there are so many arguments with robocopy that we can utilize but for checking purpose I have used only /V. 
Error:
2020-04-27T04:11:04.1190482Z ##[error]Process completed with exit code 1. 2020-04- 
27T04:11:04.1206512Z ##[debug]System.Exception: Process completed with exit code 1.    at 
Microsoft.VisualStudio.Services.Agent.Worker.Handlers.ProcessHandler.RunAsync()    at 
Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync()    at 
Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken 
jobCancellationToken) 
But the strange is ----> folder is created with timestamp and files are also copied in the destination but still, the pipeline is getting failed.
Please let me know how we can overcome this error?
 
    