I have a working directory with folder1, folder2, folder3, folder4, .. folder10
I have a text file with project (folder) names in it:
file content:
folder1
folder2
folder3
I want to read the lines from the file, and then copy only those folders to a new folder while maintaining directory structure.
mynewfolder{ folder1, folder2, folder3 }
There will be more than one file for input. The resulting working directory (I'll call it parent) would change like this:
parent before msbuild:
parent{ folder1, folder2, .., folder10, mybuild.xml}
parent after msbuild:
parent{ folder1, folder2, .., folder10, mybuild.xml,
mynewfolder{folder1, folder2, folder3},
myothernewfolder{folder5, folder7, folder9} }
The closest I've been able to get is to copy into mynewfolder all the contents of folder1, folder2, and folder3 (so, structure was lost)
I've tried to use FindInList, and I've tried using the transform method, and I also tried to adjust everything to match this example: MSBuild - Comparing ItemGroups metadata
But I haven't had much luck.
I've only had about 5 hours experience with MSBuild so I'm a bit lost at this point. Thanks in advance for any help you can offer!