Questions tagged [unzip]

Unzipping is uncompressing ZIP archives, the opposite of zipping.

2029 questions
835
votes
9 answers

Unzipping files in Python

I read through the zipfile documentation, but couldn't understand how to unzip a file, only how to zip a file. How do I unzip all the contents of a zip file into the same directory?
John Howard
  • 61,037
  • 23
  • 50
  • 66
291
votes
17 answers

Unzip All Files In A Directory

I have a directory of ZIP files (created on a Windows machine). I can manually unzip them using unzip filename, but how can I unzip all the ZIP files in the current folder via the shell? Using Ubuntu Linux Server.
Lennie De Villiers
  • 5,119
  • 7
  • 31
  • 30
280
votes
9 answers

What is a good Java library to zip/unzip files?

I looked at the default Zip library that comes with the JDK and the Apache compression libs and I am unhappy with them for 3 reasons: They are bloated and have bad API design. I have to write 50 lines of boiler plate byte array output, zip input,…
pathikrit
  • 32,469
  • 37
  • 142
  • 221
268
votes
15 answers

Unzip files programmatically in .net

I am trying to programatically unzip a zipped file. I have tried using the System.IO.Compression.GZipStream class in .NET, but when my app runs (actually a unit test) I get this exception: System.IO.InvalidDataException: The magic number in GZip…
Petteri
  • 2,701
  • 2
  • 16
  • 7
243
votes
12 answers

Unzip a file with php

I want to unzip a file and this works fine system('unzip File.zip'); But I need to pass in the file name through the URL and can not get it to work, this is what I have. $master = $_GET["master"]; system('unzip $master.zip'); What am I missing?…
BostonBB
  • 2,655
  • 3
  • 16
  • 12
149
votes
16 answers

How to unzip files programmatically in Android?

I need a small code snippet which unzips a few files from a given .zip file and gives the separate files according to the format they were in the zipped file. Please post your knowledge and help me out.
Kartik
  • 1,507
  • 2
  • 10
  • 3
121
votes
10 answers

Downloading and unzipping a .zip file without writing to disk

I have managed to get my first python script to work which downloads a list of .ZIP files from a URL and then proceeds to extract the ZIP files and writes them to disk. I am now at a loss to achieve the next step. My primary goal is to download and…
user714415
  • 1,229
  • 2
  • 9
  • 4
104
votes
7 answers

I want to create a script for unzip (.tar.gz) file via (Python)

I am trying to make a script for unzipping all the .tar.gz files from folders in one directory. For example, I will have a file which it calls ( testing.tar.gz). Then if I do manually, I can press to "extract here" then the .tar.gz file will create…
Alex
  • 1,097
  • 2
  • 9
  • 12
96
votes
11 answers

How do you recursively unzip archives in a directory and its subdirectories from the Unix command-line?

The unzip command doesn't have an option for recursively unzipping archives. If I have the following directory structure and archives: /Mother/Loving.zip /Scurvy/Sea Dogs.zip /Scurvy/Cures/Limes.zip And I want to unzip all of the archives into…
chuckrector
  • 1,471
  • 1
  • 12
  • 9
91
votes
7 answers

Unzipping files

I want to display OpenOffice files, .odt and .odp at client side using a web browser. These files are zipped files. Using Ajax, I can get these files from server but these are zipped files. I have to unzip them using JavaScript, I have tried using…
user69260
  • 1,465
  • 1
  • 12
  • 8
90
votes
12 answers

java.util.zip.ZipException: error in opening zip file

I have a Jar file, which contains other nested Jars. When I invoke the new JarFile() constructor on this file, I get an exception which says: java.util.zip.ZipException: error in opening zip file When I manually unzip the contents of this Jar file…
Sandhya Agarwal
  • 1,099
  • 3
  • 9
  • 7
76
votes
7 answers

unzip password protected zip in unix

I need to create a shell script wherein I will unzip a password protected zip file. I know the password, and need to automate the unzip process. How can I achieve this using Unix shell scripting?
Murugesh Anand
  • 779
  • 1
  • 6
  • 5
72
votes
5 answers

Extract files from zip without keeping the structure using python ZipFile?

I try to extract all files from .zip containing subfolders in one folder. I want all the files from subfolders extract in only one folder without keeping the original structure. At the moment, I extract all, move the files to a folder, then remove…
Thammas
  • 973
  • 2
  • 9
  • 14
64
votes
7 answers

Create a dedicated folder for every zip files in a directory and extract zip files

If I choose a zip file and right click "extract here" a folder with the zip filename is created and the entire content of the zip file is extracted into it. However, I would like to convert several zip files via shell. But when I do unzip…
creativeDev
  • 1,113
  • 2
  • 13
  • 20
54
votes
4 answers

How to download and unzip a zip file in memory in NodeJs?

I want to download a zip file from the internet and unzip it in memory without saving to a temporary file. How can I do this? Here is what I tried: var url =…
pathikrit
  • 32,469
  • 37
  • 142
  • 221
1
2 3
99 100