Downloading large files from google drive
If you have downloaded large files from google drive directly via browser, odds are you often got your download cancelled in the middle or so and even worse you weren’t even able to resume it. What a bad day that sounds! Nah xD. Alright, the solution is gdown, a CLI utility to tackle exactly this issue.
Ingredients required
- Python
- pip
- Install gdown using pip.
pip install gdown
Say I have a public file on gdrive, namely [Forza Horizon 4 RePack.iso](), the download link of which is something like
https://drive.google.com/u/0/uc?id=1-Ok4THxUTAKTw6Dp9nZU2QZ70GZVIWn&export=download
Note the id parameter in the URL and download suffix at the end.
Now comes the downloading part.
Using URL
gdown https://drive.google.com/u/0/uc?id=1-Ok4THxUTAKTw6Dp9nZU2QZ70GZVIWn&export=download
It downloads your file with default name into your current working directory.
Using file id
gdown 1-Ok4THxUTAKTw6Dp9nZU2QZ70GZVIWn
Same as above
With new file name
gdown 1-Ok4THxUTAKTw6Dp9nZU2QZ70GZVIWn -O Forza-Horizon-4.iso
This downloads your file with custom name.
Downloading a folder
gdown 1-Ok4THxUTAKTw6Dp9nZU2QZ70GZVIWn -O /path/to/dir --folder
This downloads your gdrive folder at a desired location in your machine.
Lastly, remember gdown --help
is always at your disposal ;)
That is pretty much about it. If you found it useful consider sharing with friends & toast this post. Thanks for taking time to read this :)