Visual Studio - Pre or Post-build events - copying example

The Pre or Post events are simple and useful actions before or after building the solution, which can be used for performing customized actions to simplify deployment or testing.

The following example copying all output files to myproject\bin located in the solution directory.
Ex.
copy "$(TargetDir)*.*" "$(SolutionDir)myproject\Bin"

For reference see Macro table in MSDN

Batch files can be used as well for more complex predefined actions using the call statement Ex. call C:\Batch.bat