Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.