Skip to content

Instantly share code, notes, and snippets.

@gabrielrojas
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielrojas/ca9a5080b8c922cce49d to your computer and use it in GitHub Desktop.
Save gabrielrojas/ca9a5080b8c922cce49d to your computer and use it in GitHub Desktop.
Compress-Archive PowerShell Version 5
<# These 3 commands test the speed that an archive folder is created using different compression values
#>
Measure-Command {Compress-Archive -Path 'C:\Users\Documents\Files\*' -DestinationPath 'C:\Users\Documents\FilesZIPFastest' -CompressionLevel Fastest}
Measure-Command {Compress-Archive -Path 'C:\Users\Documents\Files\*' -DestinationPath 'C:\Users\Documents\FilesZIPNoCompression' -CompressionLevel NoCompression}
Measure-Command {Compress-Archive -Path 'C:\Users\Documents\Files\*' -DestinationPath 'C:\Users\Documents\FilesZIPOptimal' -CompressionLevel Optimal}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment