As part of our build script we copy user messages files from a subdirectory and want to append the name of the subdirectory to the message files. i.e. msg\0\message.std > msg\message0.std
I have tried using
<Copy SourceFiles="@(MessageFiles)"
DestinationFiles="@(MessageFiles->'$(BuildRoot)\%(Filename)%(RecursiveDir)%(Extension)'"/>
However this tries to copy the file to ..\message0.std.
Is there anyway to either suppress the trailing '\' from %(RecursiveDir) or make up the destination name another way?