I am rather new to msbuild and boggling my mind on the following problem. Suppose I have the following file structure:
foo\bin\folder1_OK\file1.txt
foo\bin\folder1_OK\sub\file2.txt
foo\bin\folder2_NOK\file3.txt
bar\bin\folder3_OK\file4.txt
Using msbuild I would like to copy all folders with name ending with '_OK' and the underlying content to my drop location. I would also like to get rid of the intermediate 'bin' folder. In the example case I would like the output structure to be:
foo\folder1_OK\file1.txt
foo\folder1_OK\sub\file2.txt
bar\folder3_OK\file4.txt
Could this be achieved in a single operation? If the include attribute is '***_OK*' the RecursiveDir metadata still contains the bin folder. Is there a clever trick I can use to factor this out? Or should I better use a consecutive move task after the copy operation?