Recursive Copy in MsBuild

Simply because I always forget the syntax for this, here's how to recursively copy a set of files from one folder to another using the <Copy> task.

    <Target Name="CopyNewTags">
    	<ItemGroup>
    		<FilesToCopy Include="$(FromThisFolder)**\*.*" />
    	</ItemGroup>

    	<Copy SourceFiles="@(FilesToCopy)"
    		DestinationFolder="$(ToThisFolder)%(RecursiveDir)" />
    </Target>

The magic, of course, is in using the multi-star notation in the ItemGroup include and in using the meta value %(RecursiveDir) in the destination folder attribute.