VNext build
Seems you want to copy files from working folder on the agent computer.(The local path on the agent where your source code files are downloaded. For example: c:\agent\_work\1\s
)
You can try to use Windows Machine File Copy task.
Source: You can use pre-defined system variables such as $(Build.Repository.LocalPath)
(the working folder on the agent computer), which makes it easy to specify the location of the build
artifacts on the computer that hosts the automation agent.
Destination Folder: The folder on the Windows machine(s) to which the files will be copied. Example: C:\FabrikamFibre\Web
If your shared loaction is on the same machine. You can also try to use Copy Files.
XAML build
In XAML build, you can check in your script, and specify a post-build script path in your XAML build definition. This script gathers some of the typical binary types from the typical locations and copies them to the folder from which TFBuild copies and drops to your staging location. Check more information about Run a script in your XAML build process at website: https://msdn.microsoft.com/library/dn376353%28v=vs.120%29.aspx