Recursively copy all files with MSBuild
问题 I have the following set of files with MSBuild: <ScriptFiles Include="Server/scripts/**/*.js" /> I then copy all of it over to another directory: <Copy SourceFiles="@(ScriptFiles)" DestinationFiles="@(ScriptFiles->'$(BuildDir)/WWW/scripts/%(RecursiveDir)%(Filename)%(Extension)')" /> However, what I want to do is copy *.js , and copy /yui/*.* . What I tried doing is: <ScriptFiles Include="Server/scripts/**/*.js;Server/scripts/yui/**/*" /> However, what this does is flatten the /yui/ directory