Function to zip/unzipp

Hi there,

I’d like to suggest a Function to zip or unzipp Archives,
easiest way I can think of is to include the 7zip 7z standalone console version.

But thats probably a big Decision only for the Project Maintainers :slight_smile:

Powershell 5.1+ has two cmdlets for zipping and unzipping files. 7-Zip may be a little more efficient/faster but the built-in functions are probably “good enough” for most purposes.

Compress-Archive
Expand-Archive

1 Like

Oh boy,

I got so exited about my Idea that I forgot about that…

Your are absolutly right, I’m sorry.

You don’t need to include 7zip. You can always create a self extract archive with 7zip and extract it with the silent command:
"c:\path to sfx\sfx.exe" -o"c:\your extract path" -y

Thats a good Option for one Time unzipping yes.

The cmdlet mentioned above offers more flexibility and the Option to zip Files as well.

Thats propably all someone would need for just delivering Applications.

As I said, I got carried away by my Idea and did’t stop long enough to think about easier Solution, for that I’m sorry:)

My Idea has more merrit for other Scripting Purposes where you need more flexibility and capabilities. I use the PSADT Framework for some other Scripts, thats mostly where my Proposal came from:)