Get-ChocolateyUnzip

Get-ChocolateyUnzip

Get-ChocolateyUnzip

Unzips an archive file and returns the location for further processing.

Syntax

Get-ChocolateyUnzip `
  [-FileFullPath <String>] `
  -Destination <String> `
  [-SpecificFolder <String>] `
  [-PackageName <String>] `
  [-FileFullPath64 <String>] `
  [-DisableLogging] `
  [-IgnoredArguments <Object[]>] [<CommonParameters>]

Description

This unzips files using the 7-zip command line tool 7z.exe. Supported archive formats are listed at: https://sevenzip.osdn.jp/chm/general/formats.htm

Notes

If extraction fails, an exception is thrown.

If you are embedding files into a package, ensure that you have the rights to redistribute those files if you are sharing this package publicly (like on the community feed). Otherwise, please use Install-ChocolateyZipPackage to download those resources from their official distribution points.

Will automatically call Set-PowerShellExitCode to set the package exit code based on 7-zip’s exit code.

Aliases

None

Examples

EXAMPLE 1


# Path to the folder where the script is executing
$toolsDir = (Split-Path -parent $MyInvocation.MyCommand.Definition)
Get-ChocolateyUnzip -FileFullPath "c:\someFile.zip" -Destination $toolsDir

Inputs

None

Outputs

None

Parameters

-FileFullPath [<String>]

PropertyValue
Aliasesfile
Required?false
Position?1
Default Value
Accept Pipeline Input?false

-Destination <String>

PropertyValue
AliasesunzipLocation
Required?true
Position?2
Default Value
Accept Pipeline Input?false

-SpecificFolder [<String>]

PropertyValue
Aliases
Required?false
Position?3
Default Value
Accept Pipeline Input?false

-PackageName [<String>]

PropertyValue
Aliases
Required?false
Position?4
Default Value
Accept Pipeline Input?false

-FileFullPath64 [<String>]

PropertyValue
Aliasesfile64
Required?false
Position?named
Default Value
Accept Pipeline Input?false

-DisableLogging

PropertyValue
Aliases
Required?false
Position?named
Default ValueFalse
Accept Pipeline Input?false

-IgnoredArguments [<Object[]>]

PropertyValue
Aliases
Required?false
Position?named
Default Value
Accept Pipeline Input?false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters http://go.microsoft.com/fwlink/p/?LinkID=113216 .

Function Reference

:choco-info: NOTE

This documentation has been automatically generated from Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-ChocolateyUnzip -Full.

View the source for Get-ChocolateyUnzip