I have a text file that contains some file locations that I want to copy to the temp directory
---- List.txt ---- Build\Java Build\Classes
Now I am extracting this list into an element
<ReadLinesFromFile File="List.txt" > <Output TaskParameter="Lines" ItemName="DirectoryList" /> </ReadLinesFromFile>
Now, to add the full path and add some exceptions, I again store it in another ItemGroup:
<ItemGroup> <PackageList Include="$(BuildPath)\%(DirectoryList.Identity)\**\*.*" Exclude="$(BuildPath)\%(DirectoryList.Identity)\**\*.pdb" /> </ItemGroup> <Copy SourceFiles="@(PackageList)" DestinationFiles="@(PackageList->'$(PackageTemp)\%(SourceDirectory)\%(DirInPackage)%(RecursiveDir)%(Filename)%(Extension)')" />
QUESTION:
Actual Dir -
C:\Work\Build\Java\Debug C:\Work\Build\Java\Release C:\Work\Build\Classes\*.class
Content in O / p
C:\temp\Debug C:\temp\Release C:\temp\*.class
How to copy the corresponding folder " Java
" and " Classes
"?
source share