I have created one batch script, in this script I want to use Build.SourcesDirectory variable.
Here is the batch script:
ROBOCOPY $(Build.SourcesDirectory)\myfoldername \\servername\destinationfolder\Copy /V
Also tried this one:
ROBOCOPY "$(Build.SourcesDirectory)\myfoldername" "\\servername\destinationfolder\Copy" /V
but getting error and it's not taking the path as well
Here is my pipeline output
ROBOCOPY:: Robust File Copy for Windows
Source : E:\DevOps\Agent\vsts-agent-win-x64-2.144.2\_work\6\s\$(Build.SourcesDirectory)\myfoldername
Dest : \\servername\destinationfolder\Copy
Files : *.*
Options : *.* /V /DCOPY:DA /COPY:DAT /R:1000000 /W:30
Note: I know there is one task "Windows Machine File Copy task"
I have one bat file which is performed many tasks and one of the tasks is this.
Anyone has an idea, how we can achieve?