I want to create a folder using this Timestamp: %DATE:/=-%_%TIME::=-%
My Robocopy command is :
ROBOCOPY "%BUILD_SOURCESDIRECTORY%\sourcefolder\" "\\server\destination\%date:/=-%_%time::=-%" /V
but it is not working, getting an error:
2020-04-07T03:53:21.7269608Z ##[error]Process completed with exit code 1.
2020-04-07T03:53:21.7292925Z ##[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)
Note: I referred to the below link but I want to create a folder with date and time.in this link only date stamp mentioned.
How to use Robocopy to copy files with TimeStamp in command line
if anyone has an idea about, please let me know.