Skip to content

Instantly share code, notes, and snippets.

@pwelter34
Created July 25, 2014 15:56
Show Gist options
  • Save pwelter34/a4934fd5a0624d444395 to your computer and use it in GitHub Desktop.
Save pwelter34/a4934fd5a0624d444395 to your computer and use it in GitHub Desktop.
psake robocopy
Task Output -Depends Compile {
“Copy Outputs...”
$xf = @("*.log", "*.txt", "*.md", "*.xml", "*.pdb")
$xd = @(".git", "obj")
& robocopy "$SourceDir\bin\$BuildConfig" "$BuildDir\Output" $np /XF $xf /XD $xd /NP
if ($lastexitcode -ge 8) {
throw ("RoboCopy: Error copying files.")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment