How to Download Files Directly to Google Drive

0 Comments
Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]




This post here explains how to download files directly to Google Drive. Here I have mentioned a couple of methods you can use to download files directly to Google Drive. With both the methods, you can easily download any file from the internet via its direct URL right in your Google Drive. There are some other cloud storage providers in which you can find this option such as PCloud, but this hasn’t been implemented in Google Drive yet. There is a little bit of coding you will have to use in order to get through this but it will all worth it in the end.

Right now, to upload a file to Google Drive or most cloud providers, you have to upload it manually. And if you’ve got a slow internet connection the upload is going to take forever. In that case, you can directly download a file to Google Drive and in just a few seconds, because the internet used by Google Servers is very fast. You can download a big file in just a matter of seconds. However, I would advise you not to use these methods to download anything illegal or pirated on Google Drive as your account may get banned. Use this for something good.

How to Download Files Directly to Google Drive?

Method 1:  Download Files Directly to Google Drive via Google Colab

The very first method you can use to download files directly to Google Drive is through Google Colab. Google Colab is a very nice product for developers from Google to create, run, and save Python code. Here you can create Jupyer Notebook for data science or anything related to Python. And in this method, we will use this feature of Colab to download files to Google Drive.

Here we will use a Python SCrip that will take URL of a file and will download it to Google Drive. In order to do that, you just have to mount Google Drive to Colab space and then you are done. So, just sign in to Google Colab from here and create a Notebook. In any Notebook’s cell paste the following code and run it and complete the authorization by clicking on the link and enter the code it shows.

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

Colab drive mount

Now, Google Drive is connected to Colab and you are ready to read and write files from Drive. Below is the script responsible for downloading a file from the internet via its direct link. You can just paste it in any new cell and run the code. It will download the file and will save it in the root of the Drive.

import requests 
file_url = "LinkToDownloadFile"

r = requests.get(file_url, stream = True) 

with open("/content/gdrive/My Drive/python.pdf", "wb") as file: 
for block in r.iter_content(chunk_size = 1024): 
if block: 
file.write(block)

Google Colab File Downloaded

Above, you can see the downloaded file in the left sidebar. In this way, you can download any file to Google Drive using Google Colab. And if you want then you can write some sophisticated logic to do some pre and pos download operations. If you want to change the name of the finally downloaded file then you can change that too. For that, you can make changes in the 6th line in the downloader code starting with “with open”. Not only this but bt you can also change the path of the file to download this in any other folder on Google Drive.

Method 2:  Download Files Directly to Google Drive via Google Colab

Multicloud is a popular service that you can use to download files directly to Google Drive. This is basically a cloud transfer service used to sync or transfer data between two cloud storage’s. Here you can connect to multiple cloud storage’s and then transfer data from one to another. Apart from this, you can upload a file to any connected cloud storage with ease. And to upload a file, it lets you upload a file from your PC or from a URL.

We can use the URL upload feature of Multcloud to download a file directly to a configured Google Drive. For that, you can sign up for a free account of Multcloud from here. After signing in, add Google Drive as a storage. It will ask you to authorize access to Google Drive, so do that.

Multcloud Select Google Drive Storage

After connecting to Google Drive, you will see the file listing there. And now, you can start uploading file to it. Use the upload option and select “Upload URL” option. Next, you have to specify the direct URL of the file you want to download. Specify the file name and then start downloading. A task will be created instantly and it will start downloading your file.

add file URL multcloud

When the file has downloaded, you can check that in the file list. It is as simple as that. You can use Multcloud every time in this way whenever you want to download a file to Google Drive. The advantage of using Multloud is that you can use this with other cloud storage services available out there. It supports some most popular cloud providers and after connecting to them, you can download a file in them directly with just a URL.

The bottom lines…

If you are looking for some clever ways to download a file directly in Google Drive then you are at right place. I have added two simple and useful methods that you can use. The download speed with both methods will be the same and it’s just you have to decide which one is convenient for you. If you are from a programming background then you will find Colab method interesting and simple. Or, if you hate coding then you can use Multcloud with its intuitive UI to do the same.

Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]
Free/Paid: Free