Question: I want to execute a post-build script from TFS which copies a folder in my TFS to the Build drop location. 
I have very little knowledge of how to do this.
Kindly provide with the code.
I am using VS2015, tfs 2015.
i also have VS 2013, TFS 2013

Answer: 
TFS 2015 Build has an out of the box template 'Visual Studio' that already does this using the PublishBuildArtifacts task.

Look at leveraging this task in your build def in order to accomplish what you are looking for. 

<https://msdn.microsoft.com/en-us/Library/vs/alm/Build/steps/utility/publish-build-artifacts>

<https://github.com/Microsoft/vso-agent-tasks/tree/master/Tasks/PublishBuildArtifacts>
In XAML build, you can check in your script, and specify a post-build script path in your XAML build definition. 
[This](https://tfsbuildextensions.codeplex.com/SourceControl/latest#Scripts/GatherItemsForDrop.ps1) script gathers some of the typical binary types from the typical locations and copies them to the folder from which TFBuild copies and drops to your staging location. Check more information about Run a script in your XAML build process at website: <https://msdn.microsoft.com/library/dn376353%28v=vs.120%29.aspx>

In vNext build, you can simply add a [PublishBuildArtifacts](https://msdn.microsoft.com/en-us/Library/vs/alm/Build/steps/utility/publish-build-artifacts) task as Mr. Kraus mentions. About how to use this task, check: <http://www.codewrecks.com/blog/index.php/2015/06/30/manage-artifacts-with-tfs-build-vnext/>