Back to Homepage
Thursday 18 January 2024
41

How to Compress and Decompress Files with PowerShell

PowerShell provides built-in tools for efficiently compressing and decompressing files.

To compress files in PowerShell, you can use the following command:

Compress-Archive .Directory .Directory.zip

This command will create a zip file named Directory.zip containing all files from the specified directory.

To decompress files in PowerShell, use the following command:

Expand-Archive .Directory.zip .Directory

This command will decompress the zip file (Directory.zip) into the specified directory (Directory).

Share:
Created by:
Author photo

Jorge García

Fullstack developer