Skip to content

'Compress-Archive' should support *.gz archive extension #22

@HemantMahawar

Description

@HemantMahawar

From @MaximoTrinidad on October 3, 2016 15:44

Steps to reproduce

Ran Compress-Archive command to create a *.gz compress file.

Compress-Archive -Path /home/maxt/Documents -DestinationPath /home/maxt/MyArchives/Mycsvfiles.gz

Expected behavior

This cmdlet should allows to create a compress file of type *gz.

PS /home/maxt> Compress-Archive -Path /home/maxt/Documents -DestinationPath /home/maxt/MyArchives/Mycsvfiles.gz

Actual behavior

Cmdlet fails to create compress file *.gz giving following error message:

PS /home/maxt> Compress-Archive -Path /home/maxt/Documents -DestinationPath /home/maxt/MyArchives/Mycsvfiles.gz
Compress-Archive : .gz is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:1

  • Compress-Archive -Path /home/maxt/Documents -DestinationPath /home/ma ...
  • - CategoryInfo          : InvalidArgument: (.gz:String) [Compress-Archive], IOException
    - FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Compress-Archive
    
    

powershellcompressgzerror

Environment data

Linux: Ubuntu 16.04.1 LTS Desktop

PS C:\Program Files\PowerShell\6.0.0.10> $PSVersionTable

Name Value


PSVersion 6.0.0-alpha
WSManStackVersion 3.0
BuildVersion 3.0.0.0
PSRemotingProtocolVersion 2.3
CLRVersion
GitCommitId v6.0.0-alpha.10
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
SerializationVersion 1.1.0.1
PSEdition Core

Copied from original issue: PowerShell/PowerShell#2409

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions