Last time, i misinterpreted my situation, but you folks got me really quick and great solutions. hence coming back. I have a new situation. I have provide a snippet of my code. Not sure what is wrong.
I am trying to copy to multipleservers with same directory structure. Not sure what is wrong with it ...
<PropertyGroup>
<Srcfldr>C:\Msbuild\exproj\REbinaries</Srcfldr>
<copyfldr>c$\component1</copyfldr>
</PropertyGroup>
<ItemGroup>
<SrcToCopy Include="$(Srcfldr)\**\*"/>
</ItemGroup>
<ItemGroup>
<DestFldr Include="devsvr1;devsvr2"/>
<DestToCopy Include="@(DestFldr)\$(copyfldr)"/>
</ItemGroup>
<Target Name="DeployBatching" Outputs="%(DestToCopy.FullPath)">
<PropertyGroup>
<DestToCopy>%(DestToCopy.FullPath)</DestToCopy>
</PropertyGroup>
<RemoveDir Directories="@(DestToCopy)"/>
<MakeDir Directories="@(DestToCopy)"/>
<Copy
SourceFiles="@(SrcToCopy)"
DestinationFiles="@(SrcToCopy->'$(DestToCopy)\%(RecursiveDir)\%(Filename)%(Extension)')"
/>
</Target>