<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<MyFiles Include="C:\File1.txt" />
<MyFiles Include="C:\Projects\MyProject\File2.txt" />
</ItemGroup>
<PropertyGroup>
<SearchPath>C:\Projects\MyProject</SearchPath>
</PropertyGroup>
<Target Name="FindFiles">
<FindUnderPath
Files="@(MyFiles)"
Path="$(SearchPath)">
<Output
TaskParameter="InPath"
ItemName="FilesFoundInPath" />
<Output
TaskParameter="OutOfPath"
ItemName="FilesNotFoundInPath" />
</FindUnderPath>
</Target>
</Project>