Instructions: Extract rar or zip files in Google Drive. Save bandwidth.

General Rules

  • This Forum Rules:
    1. No asking for course requests or download links.
    2. Don't share links to other websites for downloads or references.
    3. Avoid controversial topics in discussions.

    4. Use an appropriate thread title that matches your content, not just a word.

    Other Forum Rules Can Be Found Here

rishu2022

Invest if you can afford it. Always.😎
TutFlixer
Oct 6, 2020
354
14,285
52
Google
Reliable and easy method

1. Make sure you are logged in your Gdrive.

2. Goto:
Please, Log in or Register to view URLs content!


3. Click on New Notebook in pop-up. Pics:
4. Now, in the notebook, to the extreme left, there's a 1-inch wide vertical column. Go to the column, and click on the Folder icon ("Files"). Pics:
5. The left column expands to reveal a file explorer. Click on Google Drive icon.

6. A pop-up notification will ask : "Permit this notebook to access your Google Drive files? Connecting to Google Drive will permit code executed in this notebook to modify files in your Google Drive." Click "Connect to Google Drive".

7. Now in the file explorer, there's a new folder visible called "drive". Inside it is "MyDrive". Inside it are you Gdrive contents.

8. Navigate to your rar/zip file using the file explorer. Then, right click and copy path. You can later use this same method to copy path for destination folder (where the file is extracted) as well. Pics:
9. Now in the main notebook space type:


Code:
You don't have permission to view the code content. Log in or register now.


For example:

Code:
You don't have permission to view the code content. Log in or register now.

Pics:
10. Click on Run Cell play button. Or, instead do Ctrl+Enter to execute code.

11. Password will be asked. Type the password (tutflix), and press Enter. Extraction begins. That's all!

12. For 'zip' files replace !unrar with !unzip command.
 
Last edited:

Ceaseless

Active member
Staff member
Moderator
TutFlixer
Sep 6, 2020
530
274
37
India
by the way, is this method free? and what do you mean by save bandwith? thanks
 
  • Like
Reactions: daneee

rishu2022

Invest if you can afford it. Always.😎
TutFlixer
Oct 6, 2020
354
14,285
52
Google
If the file name or file path has spaces in between, enclose everything in quotes.

Eg:

!unrar x -y /content/drive/MyDrive/CalebPorzio MakeVSCode Awesome.rar -d /content/drive/MyDrive

will NOT work.

!unrar x -y "/content/drive/MyDrive/CalebPorzio MakeVSCode Awesome.rar" -d "/content/drive/MyDrive"

will work.
 
Last edited:
  • Like
Reactions: tourist

Raghav

Member
TutFlixer
Oct 4, 2020
52
92
13
India
it will only work if we have only one zip files but many of them are splitter it will not work on them and there is no option to enter password also.
 
  • Like
Reactions: rishu2022

rishu2022

Invest if you can afford it. Always.😎
TutFlixer
Oct 6, 2020
354
14,285
52
Google
It "will" ask for password. The -y in the above command is for asking passwords in case of password protected zips/rars.
 

Xodonkhan

New member
TutFlixer
Sep 11, 2020
24
50
8
Jannat
Awesome trick bro! But, Is there any limit for extraction? Or I can extract unlimited files irrespective of their sizes every day?
 

rishu2022

Invest if you can afford it. Always.😎
TutFlixer
Oct 6, 2020
354
14,285
52
Google
I don't know what're the limits. But it worked for 3-4 GB rar files.
 

rishu2022

Invest if you can afford it. Always.😎
TutFlixer
Oct 6, 2020
354
14,285
52
Google
Run this code in Google Colab, and share the speed:

!curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python

My Download and Upload speeds are 300Mbps +

Pic
 

rishu2022

Invest if you can afford it. Always.😎
TutFlixer
Oct 6, 2020
354
14,285
52
Google
Just thought of adding something for my own future reference.

Download directly from static link in Gdrive using Google Colab:

Step1:

Code:
You don't have permission to view the code content. Log in or register now.

Step 2:

To download a file -
!wget 'specify-the-url'

To resume downloading a file -
!wget -c 'specify-the-url'

To mirror an entire website -
!wget -m --page-requisites --no-parent http://example.com/exam-questions

To download an entire directory -
!wget -r ftp://example.com/folder

To download a list of files at once -
wget -i download.txt

where the download.txt contains the list of URLs.

Step 3:


Using Google Colab file explorer on left move the downloaded folders/files wherever you want.
 

rishu2022

Invest if you can afford it. Always.😎
TutFlixer
Oct 6, 2020
354
14,285
52
Google
Again adding something for my own future reference. Google colab comes with ffmpeg installed. We can install handbrake-cli (just like in Linux) for this.

Batch compress and convert videos to very small size in a Google Drive folder to save space using Google Colab:


[CODE lang="bash" title="Code to batch compress GDrive Videos in a folder" highlight="3,4,13"]import os, sys, re

input_folder= 'path-to-the-video-folder'
output_folder= 'path-to-output-folder'

my_suffixes = (".mp4", ".mov", ".mkv", ".avi", ".ts", ".flv", ".webm", ".wmv", ".mpg", ".m4v", ".f4v")

from pathlib import Path
Path(output_folder).mkdir(parents=True, exist_ok=True)

for filename in os.listdir(input_folder):
if (filename.endswith(my_suffixes)):
cmd = !ffmpeg -stats -i "$input_folder/{filename}" -preset veryfast -c:v libx264 -crf 18 -profile:v main "$output_folder/{filename}"[/CODE]


References:
Please, Log in or Register to view URLs content!
Please, Log in or Register to view URLs content!
Please, Log in or Register to view URLs content!
 
  • Like
Reactions: mikoko

utsgoal.0000

New member
TutFlixer
May 7, 2022
10
3
3
Korea
rishu2022 thank you so much, I used it and it worked perfectly, even with the spaces and with a file that was divided into many parts. Thank you so much!
 

Latest resources