How To

How to unzip a GZ file in Windows 10 [Quick Guide]



Any type of compressed file format that you are dealing with can be easily opened with WinZip. Take advantage of teh offer now!


2. How can I unzip a GZ file using a Command-Line?

  1. Press Start
  2. Type in cmd, and open the Command Prompt with Administrator rights
  3. Type in the following command, and then press Enter to initialize it:


3. How can I unzip GZ files with Powershell?

  1. Press Start
  2. Type in powershell and launch PowerShell with Administrative privileges
  3. Type in the following command and press Enter to apply it:
function unzip($path,$to) {
    $7z = "$env:TEMP7z"
    if (!(test-path $7z) -or !(test-path "$7z7za.exe")) { 
        if (!(test-path $7z)) { md $7z | out-null }
        push-location $7z
        try {
            write-host "Downloading 7zip" -foregroundcolor cyan
            $wc = new-object
            $wc.headers.add('user-agent', [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox)
            write-host "done." foregroundcolor green

            add-type -assembly ""
        finally { pop-location }

    if ($path.endswith('.tar.gz') -or $path.endswith('.tgz')) {
        # This is some crazy s**t right here
        $x = "cmd"
        $y = "/C `"^`"$7z7za.exe^`" x ^`"$path^`" -so | ^`"$7z7za.exe^`" x -y -si -ttar -o^`"$to^`""
        & $x $y
    } else {
        & "$7z7za.exe" x $path -y -o"$to"

By following these steps, you should now be able to extract GZ files in whatever manner you find useful.

Let us know which of the methods described above was more useful to you, by leaving your feedback in the comments section below.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button