Tariq Hussain
Tariq Hussain

Reputation: 128

How can I extract the zip file in colab?

This is my file;

ucf101_jpegs_256.zip.001

enter image description here

I have used this method but it is showing me the error;

!unzip ucf101_jpegs_256.zip.001

Archive:  ucf101_jpegs_256.zip.001
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ucf101_jpegs_256.zip.001 or
        ucf101_jpegs_256.zip.001.zip, and cannot find ucf101_jpegs_256.zip.001.ZIP, period.

Upvotes: 0

Views: 7018

Answers (1)

I'mahdi
I'mahdi

Reputation: 24069

  1. make sure your zip file is on the root of your drive.

  2. First Mount your Google Drive

from google.colab import drive
drive.mount('/content/drive')

Run the below cell to Unzip a .zip file

!unzip "/content/drive/My Drive/ucf101_jpegs_256.zip.001" -d "/content/drive/My Drive/"

Upvotes: 3

Related Questions