ShareSpark

 

Author Topic: How to extract compressed zip rar tar files directly in google drive?  (Read 2001 times)

0 Members and 1 Guest are viewing this topic.

Offline Megatron

  • Topic Author
  • Uploader
  • Devoted Member
  • *
  • Thanked: 224
  • Reputation: 23
  • Activity:
    0%
  • Join Date: Jul 2021
  • Posts: 105
  • Gender: Male
  • Yes I'm that same Megatron who plays CS!
:hi:
Today I'm going to tell you how can you extract your compressed files directly in you google drive.

 :info: :info2: :details:

So this can be done by writing a simple script on google colab. Ok Split your screen now and just follow the following steps one by one:-
STEP 1. Go to You are not allowed to view links. Register or Login

STEP 2. Create a new notebook


STEP 3. Mount your gdrive by running the following script
from google.colab import drive
drive.mount(‘/content/gdrive’)



Now Copy the authorization code of your account


And Paste the authorization code into the output shell.


Congrats! Now your Google Drive is mounted.


STEP 4.  Run the following commands--->
(a) To extract a zip file:-
!unzip "path of the zip file" -d "path of destination"

(b) To extract a rar file:-
!unrar x "/content/drive/path/input_file_name.rar" "/content/drive/path/output_folder/"

(c) To extract a tar file:-
!tar -xvf "/content/drive/path/input_file_name.tar" -C "/content/drive/path/output_folder/"     (run this command to extract tar files)

!tar -xzvf "/content/drive/path/input_file_name.tar.gz" -C "/content/drive/path/output_folder/"     (run this command to extract tar.gz files)

!tar -xjvf "/content/drive/path/input_file_name.tar.bz2" -C "/content/drive/path/output_folder/"     (run this command to extract tar.bz2 files)


    Things to remember:-
    • First path in double quotes(don't remove double quotes) - Your Google Drive file location which you want to Extract
    • Second path in double quotes(don't remove double quotes) - Path where you want to extract the file in Google Drive

    P.S If anyone still has a problem, you can reply and I'll share with you a link to my already created notebook and you can just directly use it to extract your files.

    Regards,
    Megatron :hat:

    Offline amesurn

    • Semi Newbie
    • *
    • Thanked: 3
    • Reputation: 0
    • Activity:
      0%
    • Join Date: Jul 2021
    • Posts: 31
     :rep: :10/10: :appl: :appl: :thanks:
     

    Offline Rai..!

    • Elite Moderator
    • Legend Member
    • *
    • Thanked: 12853
    • Reputation: 1345
    • Activity:
      0%
    • Join Date: Nov 2020
    • Age: Age
    • Posts: 8457
     :heart:
     

    Offline losslesslover

    • Semi Newbie
    • *
    • Reputation: 0
    • Activity:
      0%
    • Join Date: Sep 2021
    • Posts: 6
    Re: How to extract compressed zip rar tar files directly in google drive?
    « Reply #3 on: September 08, 2021, 11:55:34 PM »
     :thanks: :thanks: :thanks: :heart: :heart:
     

    Offline Cinemadrop

    • V.I.P.
    • Hero Member
    • *
    • Thanked: 759
    • Reputation: 84
    • Activity:
      0%
    • Join Date: Aug 2021
    • Posts: 338
    • Gender: Male
    Re: How to extract compressed zip rar tar files directly in google drive?
    « Reply #4 on: October 27, 2021, 09:43:30 AM »
    :heart: :heart: :10/10:
    « Last Edit: March 02, 2022, 02:28:36 PM by Cinemadrop »
     

    Offline Userjo

    • Semi Newbie
    • *
    • Thanked: 13
    • Reputation: 1
    • Activity:
      0%
    • Join Date: Mar 2020
    • Posts: 44
    HOW TO EXTRACT ONLY A SPECIFIC FILE FROM THE LIST of FILES INCLUDED IN the .tar archive?
     

    Offline VENOMCLONE

    • Beginner
    • *
    • Thanked: 14
    • Reputation: 0
    • Activity:
      0%
    • Join Date: Aug 2020
    • Posts: 72
    You are not allowed to view links. Register or Login
    HOW TO EXTRACT ONLY A SPECIFIC FILE FROM THE LIST of FILES INCLUDED IN the .tar archive?


     Instead of using anything. you should use Raidrive. If you use window.

     

    Offline Ind98

    • Devoted Member
    • **
    • Thanked: 34
    • Reputation: 0
    • Activity:
      1.6%
    • Join Date: Oct 2023
    • Posts: 131
    Re: How to extract compressed zip rar tar files directly in google drive?
    « Reply #7 on: December 15, 2023, 04:55:12 PM »
    Thanks for the informations  :thanks:
     

    Offline vgohil99

    • Uploader
    • Semi Newbie
    • *
    • Thanked: 15
    • Reputation: 0
    • Activity:
      0.2%
    • Join Date: Dec 2022
    • Posts: 20
    Re: How to extract compressed zip rar tar files directly in google drive?
    « Reply #8 on: August 23, 2024, 05:27:15 PM »
    Please help  :help:


    How to Rename file inside compressed zip rar tar files directly in google drive?  :help:


     :help:
     

    Offline Christopher653

    • Newbie
    • *
    • Reputation: 0
    • Activity:
      0.2%
    • Join Date: Aug 2024
    • Posts: 1
    Re: How to extract compressed zip rar tar files directly in google drive?
    « Reply #9 on: August 27, 2024, 05:22:14 PM »
    hey,

    honestly, it seems a bit complicated for the first time, but it looks cool! thanks for the detailed guide, it’ll definitely come in handy. if something doesn’t work, I’ll let you know. it’s great that you shared this method, sometimes it’s super useful to quickly extract something in Drive.

    Christopher You are not allowed to view links. Register or Login
     

     

    SimplePortal 2.3.7 © 2008-2024, SimplePortal