title: The command "XCOPY" exited with code 4 error while building checkin with new build definition
body: <p>I am using TFS2012.I have created a build definition to build every checkIn uding VS2012. In Vs2008 for my project i have created a pre-build event with XCOPY to copy some files from solution Directory to another folder.But after i do CheckIn Build is failing with following error</p>
  
  <pre><code>Summary
  Debug | Any CPU
   1 error(s), 0 warning(s)
  $/test/coding_files/cal_reg.sln - 1 error(s), 0 warning(s), View Log File
   C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets (895): The command "XCOPY "C:\Builds\1\test\New Build Definition 1\Sources\coding_files\*.*" "\\pc97\D\" /E /Y /R /K" exited with code 4.
   $/test/coding_files/cal_reg.sln compiled
   No Test Results
   No Code Coverage Results
  Other Errors and Warnings
   1 error(s), 0 warning(s)
   Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)
  Exception Stack Trace:    at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
     at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
     at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
     at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
  </code></pre>
  
  <p>Why this is happening?what to do to execute copy command before build?</p>