{
  "id": 179057,
  "title": "How to unzip files in google drive?",
  "url": "/competitions/diabetic-retinopathy-detection/discussion/179057",
  "author_name": "",
  "post_date": "2020-09-01T08:48:27.291037600Z",
  "votes": null,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I've downloaded dataset in the google drive through google colab and now i want to unzip dataset in google drive so that i can use the dataset in google colab from google drive directly. All files are in the same folder in google drive.<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5198636%2Fd811b1adcc630add6d06b53f2a4f9da5%2Fphoto_2020-09-01_14-10-45.jpg?generation=1598950086171663&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": "993943",
      "postDate": "09/01/2020 08:48:27",
      "content": "<p>I've downloaded dataset in the google drive through google colab and now i want to unzip dataset in google drive so that i can use the dataset in google colab from google drive directly. All files are in the same folder in google drive.<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5198636%2Fd811b1adcc630add6d06b53f2a4f9da5%2Fphoto_2020-09-01_14-10-45.jpg?generation=1598950086171663&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I've downloaded dataset in the google drive through google colab and now i want to unzip dataset in google drive so that i can use the dataset in google colab from google drive directly. All files are in the same folder in google drive.![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5198636%2Fd811b1adcc630add6d06b53f2a4f9da5%2Fphoto_2020-09-01_14-10-45.jpg?generation=1598950086171663&alt=media)",
      "votes": null
    },
    {
      "id": "994184",
      "postDate": "09/01/2020 12:54:31",
      "content": "<p>Hello <a href=\"https://www.kaggle.com/paurav2912\" target=\"_blank\">@paurav2912</a> </p>\n<p>The following code should help</p>\n<pre><code>import zipfile\nwith zipfile.ZipFile(address/filename.zip, 'r') as zip_ref:\n    zip_ref.extractall(target_folder_to_extract_to)\n</code></pre>",
      "rawMarkdown": "Hello @paurav2912 \n\nThe following code should help\n\n```\nimport zipfile\nwith zipfile.ZipFile(address/filename.zip, 'r') as zip_ref:\n    zip_ref.extractall(target_folder_to_extract_to)\n```",
      "votes": null
    },
    {
      "id": "995479",
      "postDate": "09/02/2020 13:34:24",
      "content": "<p>You can use \"!\" in front of a line of code to execute terminal commands (ex: !ls , !cd ..)</p>\n<p>!sudo apt-get install unzip<br>\n!unzip file.zip -d destination_folder</p>\n<p>I think they already have unzip installed so just run:<br>\n!unzip file.zip -d destination_folder</p>",
      "rawMarkdown": "You can use \"!\" in front of a line of code to execute terminal commands (ex: !ls , !cd ..)\n\n!sudo apt-get install unzip\n!unzip file.zip -d destination_folder\n\nI think they already have unzip installed so just run:\n!unzip file.zip -d destination_folder",
      "votes": null
    },
    {
      "id": "998852",
      "postDate": "09/05/2020 06:22:24",
      "content": "<p>I do unzip file but i can not unzip or extract the images from it because google drive think its a compressed archived file but like i extract images on windows by a software called 7zip how to extract images from all train test files.<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5198636%2F64ba804c5aa1e0e9f9a9974c4b78bdff%2Fasdfasdf.png?generation=1599286910176584&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I do unzip file but i can not unzip or extract the images from it because google drive think its a compressed archived file but like i extract images on windows by a software called 7zip how to extract images from all train test files.![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5198636%2F64ba804c5aa1e0e9f9a9974c4b78bdff%2Fasdfasdf.png?generation=1599286910176584&alt=media)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 994184,
      "author_name": "lonewolf95",
      "author_url": "",
      "post_date": "09/01/2020 12:54:31",
      "content": "<p>Hello <a href=\"https://www.kaggle.com/paurav2912\" target=\"_blank\">@paurav2912</a> </p>\n<p>The following code should help</p>\n<pre><code>import zipfile\nwith zipfile.ZipFile(address/filename.zip, 'r') as zip_ref:\n    zip_ref.extractall(target_folder_to_extract_to)\n</code></pre>",
      "votes": null,
      "replies": []
    },
    {
      "id": 995479,
      "author_name": "alincijov",
      "author_url": "",
      "post_date": "09/02/2020 13:34:24",
      "content": "<p>You can use \"!\" in front of a line of code to execute terminal commands (ex: !ls , !cd ..)</p>\n<p>!sudo apt-get install unzip<br>\n!unzip file.zip -d destination_folder</p>\n<p>I think they already have unzip installed so just run:<br>\n!unzip file.zip -d destination_folder</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 998852,
      "author_name": "paurav2912",
      "author_url": "",
      "post_date": "09/05/2020 06:22:24",
      "content": "<p>I do unzip file but i can not unzip or extract the images from it because google drive think its a compressed archived file but like i extract images on windows by a software called 7zip how to extract images from all train test files.<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5198636%2F64ba804c5aa1e0e9f9a9974c4b78bdff%2Fasdfasdf.png?generation=1599286910176584&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "993943": "I've downloaded dataset in the google drive through google colab and now i want to unzip dataset in google drive so that i can use the dataset in google colab from google drive directly. All files are in the same folder in google drive.![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5198636%2Fd811b1adcc630add6d06b53f2a4f9da5%2Fphoto_2020-09-01_14-10-45.jpg?generation=1598950086171663&alt=media)",
    "994184": "Hello @paurav2912 \n\nThe following code should help\n\n```\nimport zipfile\nwith zipfile.ZipFile(address/filename.zip, 'r') as zip_ref:\n    zip_ref.extractall(target_folder_to_extract_to)\n```",
    "995479": "You can use \"!\" in front of a line of code to execute terminal commands (ex: !ls , !cd ..)\n\n!sudo apt-get install unzip\n!unzip file.zip -d destination_folder\n\nI think they already have unzip installed so just run:\n!unzip file.zip -d destination_folder",
    "998852": "I do unzip file but i can not unzip or extract the images from it because google drive think its a compressed archived file but like i extract images on windows by a software called 7zip how to extract images from all train test files.![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5198636%2F64ba804c5aa1e0e9f9a9974c4b78bdff%2Fasdfasdf.png?generation=1599286910176584&alt=media)"
  },
  "source": "meta"
}