2

I have been provided with access to a zip file/folder which is stored in my google drive and inside "Shared with me".

How can I download it to my laptop through terminal using "wget" or python or anything related.

The url for the whole folder within which it is contained goes like, https://drive.google.com/drive/folders/13cx4SBFLTX8CqIqjjec9-pcadGaJ0kNj and the shareable link to the zip file is https://drive.google.com/open?id=1PMJEk3hT-_ziNhSPkU9BllLYASLzN7TL.

Since the files are 12GB in size in total, downloading them by clicking is quite tiresome when working with Jupyter notebook.

Kara
  • 6,115
  • 16
  • 50
  • 57
dJOKER_dUMMY
  • 699
  • 2
  • 6
  • 5
  • Will this information be useful for you? https://stackoverflow.com/questions/48133080/how-to-download-a-google-drive-url-via-curl-or-wget/48133859#48133859 – Tanaike Feb 04 '18 at 02:22
  • @Tanaike , not working. – dJOKER_dUMMY Feb 05 '18 at 07:42
  • @Tanaike , would you please look at the file from the link I have put up here? Click the link and it automatically shows up in the "Shared with you" folder. How I am suppose to download it from there? – dJOKER_dUMMY Feb 05 '18 at 07:42
  • I'm sorry for the inconvenience. Can you show us the detail information about the flow that you did? If you can do, please add it to your question as update. By this, users will be able to see your current situation, might lead to the solution and workaround. – Tanaike Feb 05 '18 at 07:59
  • This seems to be a duplicate of this question and answer: https://stackoverflow.com/questions/48133080/how-to-download-a-google-drive-url-via-curl-or-wget# – Eric Nord May 04 '19 at 21:31

2 Answers2

2

download the whole folder

!pip uninstall --yes gdown # After running this line, restart Colab runtime.
!pip install gdown -U --no-cache-dir
import gdown

url = r'https://drive.google.com/drive/folders/1sWD6urkwyZo8ZyZBJoJw40eKK0jDNEni'
gdown.download_folder(url)
0

You can check my answer here (Updated March 2018): https://stackoverflow.com/a/49444877/4043524

There is one little issue with your case. In your situation, the format of the URL is different from the one mentioned in the link given above.

But, don't worry, you just have to copy the ID (a random-looking string in front of "id" key in the URL) and replace the FILEIDENTIFIER in the script with it.

Amit Chahar
  • 2,519
  • 3
  • 18
  • 23