Download files from onedrive or any url to gdrive with colab.

Hello guys, Since last two days i was searching for a method to download files specially from Onedrive to GDrive with colab but i didn’ t found anything bad luck i guess.

I have written few lines of script to do that. With this method I’m getting around around 80 - 90 mbps speed for onedrive download.

Here’s how to do that.

  1. Open this colab

  2. Paste url and destination path. Ex: /content/drive/username/folder/filename.extention

Getting link for onedrive file

  1. Clink on file and then clink on share button.

Screenshot 2020-07-09 at 11.31.14 PM

  1. Make sure permission is same as shown in picture. Click on copy link. Thats it.

Screenshot 2020-07-09 at 11.26.40 PM

For other urls just use first shell and paste the link and destination path.

I hope you will find it helpful.


Good Work Not Tested But Awesome

thhx, its awesome. OneDrive has the powerautomate which could help also.
does it work with folders?

wht abt vice versa gdrive to onedrive?

its easy
use MS bought it
its free

what is this problem sir?
/content/drive/My Drive/Torrent: Is a directory

Any trick to download from to google drive? Thanks before.

Automation can tranfer only few mbs of files 50mb i guess. Not yet working with folders. Also added torrent download script so everything in one place.

Sorry i don’t use mega cloud. Gdrive and onedrive works fine for me. :slightly_smiling_face:


Are you trying to download with torrent if yes i have added new script in the file use that one. If not torrent then please give file name and extention as well.
For Ex:- let’s say you are trying to download a mp4 video so your path will look like this. /content/drive/My Drive/Torrent/filename.mp4


No it doesn’t work gdrive to onedrive because colab can easily mount gdrive but mounting onedrive is pain. Still trying i hope i’ll find a solution soon.

1 Like

There is a post here about it. Try it Mega to Google Drive Transfer Via Colab - Video Tutorial

1 Like

it worked. thank you sir;;;;