Written by James McDonald

February 12, 2024

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.

You May Also Like…

Robocopy exclude Directories

Just trying to copy everything except a couple of directories from a drive to my NAS This is the secret incantation of...