Skip to content

Instantly share code, notes, and snippets.

@blachniet
Last active March 16, 2018 11:55
Show Gist options
  • Select an option

  • Save blachniet/7126454 to your computer and use it in GitHub Desktop.

Select an option

Save blachniet/7126454 to your computer and use it in GitHub Desktop.
Simple pack script that puts the contents of a C# project build directory into a timestamped folder
$timestamp = Get-Date -Format yyyyMMdd-HHmm
$dir = "pack_$timestamp"
Remove-Item "$dir" -Force -Recurse -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Path "$dir"
Get-ChildItem .\* -Include *.md, *.exe, *.exe.config, *.dll -Exclude *.vshost.exe, *.vshost.exe.config |
% { Copy-Item $_ "$dir" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment