title: MSBuild copy files to directory path with wildcard
body: <p>I have a DLL that I want to copy to &quot;\Folder1\DestinationDir&quot; and &quot;\Folder2\DestinationDir&quot;. I tried using a wild carded destination path:</p>
  <pre><code>&quot;\Folder*\DestinationDir&quot;, 
  </code></pre>
  <p>but I got an error:</p>
  <pre><code>No Destination specified for Copy.
  </code></pre>
  <p>Here's my XML:</p>
  <pre><code>&lt;ItemGroup&gt;
    &lt;ItemToCopy Include=&quot;$(OutDir)Mydll.dll&quot; /&gt;
  &lt;/ItemGroup&gt;
  &lt;ItemGroup&gt;
    &lt;DeployPath Include=&quot;$(MSBuildProjectDirectory)\Folder*\DestinationDir&quot; /&gt;
  &lt;/ItemGroup&gt;
  &lt;MakeDir Directories=&quot;$(DeployPath)&quot; /&gt;
  &lt;Copy SourceFiles=&quot;@(ItemToCopy)&quot; DestinationFolder=&quot;%(DeployPath.FullPath)&quot; /&gt;
  </code></pre>
  <p>Any help would be much appreciated.</p>
  <h3>See also</h3>
  <blockquote>
  <p><a href="https://stackoverflow.com/questions/1657684/creating-a-list-of-folders-in-an-itemgroup-using-msbuild">Creating a list of Folders in an ItemGroup using MSBuild</a></p>
  </blockquote>