How to Download a Very Large File From Google Drive? [Solved]

Here are step-by-step instructions to download a file from Google Drive using the command line API if the file is shared privately and needs authentication.

Get the file ID:

  1. Go to your Google Drive in your browser.
  2. Right-click (or control-click) the file you want to download and click “Get shareable link”. The link looks like this: https://drive.google.com/open?id=XXXXX. Make note of the file ID “XXXXX”; you will be needing it below.

Get an OAuth token:

  1. Go to OAuth 2.0 Playground
  2. In the “Select the Scope” box, scroll down, expand “Drive API v3”, and select https://www.googleapis.com/auth/drive.readonly
  3. Click “Authorize APIs” and then “Exchange authorization code for tokens”. Copy the “Access token”; you will be needing it below.

Download the file from the command line:

If using OS X or Linux, open the “Terminal” program and enter the following command.  

  1. curl -H "Authorization: Bearer YYYYY" https://www.googleapis.com/drive/v3/files/XXXXX?alt=media -o ZZZZZ

If using Windows, open the “PowerShell” program and enter the following command.

  1. Invoke-RestMethod -Uri https://www.googleapis.com/drive/v3/files/XXXXX?alt=media -Method Get -Headers @{"Authorization"="Bearer YYYYY"} -OutFile ZZZZZ

In your command, replace “XXXXX” with the file ID from above, “YYYYY” with the access token from above, and “ZZZZZ” with the file name that will be saved (for example, “myFile.mp4” if you’re downloading an mp4 file).

Press Enter and let the download begin.

Another simple way to download a very large file from Google Drive?

This could be a problem with your internet or your computer, as we have downloaded 2GB+ files before. Have you attempted this on any other computers or web browsers? Those could be causing your issues.

But if the issue really is the file size, we suggest doing what you mentioned - unzip the file in Google drive and try to download it in smaller pieces. we believe Google Drive also has an option to re-zip files into a folder, so you could re-zip the files into two different folders, each 1.25GB, making them possible for you to download.

  • Comments List

Leave a Comment

  • Related Blogs
Disclaimer:

Number For Help are not associated with any assistance for tarvel, airlines or tech products issues. This is an informatory website for new and existing technology terms, we hereby disclaims any affiliation, sponsorship & endorsement of or by any third party!

Looking for Best and Accurate Solution for your problem ?

Contact us today for more information.

  • www.numberforhelp.com

  • info@numberforhelp.com

  • 454 Stadium Way, Los Angeles, CA, USA 90210