Run 7-zip from powershell

The performance of both the…

Login

Blog History

The performance of both the Windows and Powershell Zip utilities is abysmal

The following Powershell script enables a Zip operation on approximately 0.33GB of data consisting of around 59,000 files to go from minutes down to less than a minute using 7-Zip instead of Powershells Compress-Archive

Ref: https://stackoverflow.com/a/25288780

Features

  • Raise an error if 7zip is missing
  • Create a timestamped filename
  • Use environment variables to locate common directories for portability
  • Skip a folder that should not be included in the resulting zip file using the -xr! syntax
  • Display a nice progress GUI with 7zg.exe

7-Zip GUI pops up so you can view the progress

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.