I have a Visual Studio 2013 Solution with custom project types provided by a plugin. These projects do not support specifying the build outputs folder or post build events. I need to copy the build outputs from the outputs location of each project to a single bin
folder such that they can be uploaded to a drop location in TFS. How would I write a batch script or similar to copy the outputs from
\SolutionDir\Project1\Debug\Win32\*
\SolutionDir\Project2\Debug\Win32\*
...
to
\SolutionDir\bin\Debug\Win32\*
Bearing in mind that some projects depend on others and therefore the same .dll
may be present in multiple locations. It doesn't matter which I keep. I tried something like
for /f "tokens=*" %a in ('dir *.dll *.exe /b /s /a-d') do copy "%a" "bin" /y
But that does not preserve the \Debug\Win32
folder structure