A simple unzip function in Powershell

2016-04-06

Code

1 minute

function UnzipFiles($ZipFileName, $DestDir)
{
    Add-Type -Assembly System.IO.Compression.FileSystem
    [System.IO.Compression.ZipFile]::ExtractToDirectory($ZipFileName, $DestDir)
}

To use the function:

UnzipFiles -ZipFileName .\folder\file.zip -DestDir .\destination