Hello,
I am running into an issue when trying to batch a copy operation. If I remove the %(RecursiveDir) from the code below, the script works, although all the files are copied under the main destination folder. I would expect that using %(RecursiveDir) to solve this problem, although, it doesn't work. How should the script be modified to recursively copy files to multiple destinations?
Thank you,
Alin
<?
xml version="1.0" encoding="utf-8"?>
<
Project DefaultTargets="Main" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<
Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<
UsingTask AssemblyFile="$(MSBuildExtensionsPath)\MSBuild.Community.Tasks\MSBuild.Community.Tasks.dll" TaskName="MSBuild.Community.Tasks.Time" />
<
PropertyGroup>
</
PropertyGroup>
<
ItemGroup>
<
IISSourceFiles Include="..\_PublishedWebsites\**\*.*"/>
</
ItemGroup>
<
ItemGroup>
<
SetE Include="01">
<
IISServerShare>C:\Temp\1</IISServerShare>
<
Do>true</Do>
</
SetE>
<
SetE Include="02">
<
IISServerShare>C:\temp\2</IISServerShare>
<
Do>true</Do>
</
SetE>
</
ItemGroup>
<
Target Name="Main">
<
Copy
SourceFiles="@(IISSourceFiles)"
DestinationFolder="%(SetE.IISServerShare)%(RecursiveDir)" />
</
Target>
</
Project>