title: Azure DevOps Pipeline Copy Files Task Target Directory Value
body: <p>I am new to Azure DevOps. I tried many ways but nothing helped. I am trying to create a pipeline which has Copy Files Task. I have folder structure like below</p>
  
  <pre><code>Bin
    Common
      abc.dll
  
  Staging
    Bin
      Common
  </code></pre>
  
  <p>I want to copy abc.dll from Bin\Common to Staging\Bin\Common</p>
  
  <p>In my Copy Files Task I am giving below</p>
  
  <pre><code>Source: Bin/Common
  Contents: *.dll
  Target Folder: Staging/Bin/Common
  
  In Advanced:
  Clean Target Folder: Check
  Overwrite: Check
  </code></pre>
  
  <p>The Copy File Task succeeds and when I go to my Repo I donot see abc.dll in Staging\Bin\Common folder. In my Copy File Task log I see</p>
  
  <pre><code>Copying D:\a\1\s\Bin\Common\abc.dll to Staging\Bin\Common\abc.dll
  </code></pre>
  
  <p>I guess it must be</p>
  
  <pre><code>Copying D:\a\1\s\Bin\Common\abc.dll to D:\a\1\s\Staging\Bin\Common\abc.dll
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><strong>SOLUTION</strong></p>
  
  <p>Thanks to <code>4c74356b41</code> for pointing me in right direction. I accepted and marked as answer. As suggested, I created variable and used it like below</p>
  
  <pre><code>Variable Name: BinCommonStagingFolder
  Variable Value: $(Build.Repository.LocalPath)\Staging\Bin\Common\
  </code></pre>
  
  <p>I used the variable in my Copy Files Task like below to copy only files which I need not all files</p>
  
  <pre><code>Source: Bin/Common
  Contents: 
  abc.dll
  abc.pdb
  Target Folder: $(BinCommonStagingFolder)
  
  In Advanced:
  Clean Target Folder: Check
  Overwrite: Check
  </code></pre>