Skip to content

Instantly share code, notes, and snippets.

@vishnuexe
Last active May 5, 2025 09:54
Show Gist options
  • Select an option

  • Save vishnuexe/5b93d4298e00e5dd9038cca0e2ac3553 to your computer and use it in GitHub Desktop.

Select an option

Save vishnuexe/5b93d4298e00e5dd9038cca0e2ac3553 to your computer and use it in GitHub Desktop.
Downloading google drive files using gdown through terminal
Step1:
pip install gdown
Step2:
pip install --upgrade --no-cache-dir gdown
Step3:
Copy file/folder id from google drive (copy the sharabel link and paste it somewhere https://drive.google.com/file/d/1ndGh-3D8kaVFktogs_jhPkvXac90vzTh/view?usp=drive_link)
here this is the file id - 1ndGh-3D8kaVFktogs_jhPkvXac90vzTh
Links will be of the format - https://drive.google.com/file/d/<file_id>/view?usp=drive_link
Step4:
Now paste the file id with the commands below and execute!
gdown https://drive.google.com/uc?id=<file_id> # for files
gdown --folder https://drive.google.com/drive/folders/<file_id> # for folders
PS:Make sure the file or folder you want to download is shared and set to 'Anyone with the Link'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment