And for your situation, you can use any of the tasks (Publish Artifacts task and Copy Files task). Since you only need to copy the contents under $(build.artifactstagingdirectory)
to the share path \\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)
, both the tasks can also achieve it.
If you use the Publish Artifacts task, settings as you specified in the picture is ok. It will copy the contents under $(build.artifactstagingdirectory)
to \\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)\drop
.
If you use the Copy Files task, settings as be set as below. It will also the same result as the Publish Artifacts task.