Skip to content

Instantly share code, notes, and snippets.

@DavideDunne
Last active August 16, 2023 17:12
Show Gist options
  • Save DavideDunne/99d705d126d3ce6949832c2cce6ffa7c to your computer and use it in GitHub Desktop.
Save DavideDunne/99d705d126d3ce6949832c2cce6ffa7c to your computer and use it in GitHub Desktop.
Zip everything in current dir
#This script will copy all the files in current directory into a zip
$Files = Get-ChildItem -Exclude *.ps1 -Name
Write-Host $Files
foreach($File in $Files){
Compress-Archive -Path $File -Update -DestinationPath files.zip
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment