I need the file path for a file stored in Google drive, so I can access it from a Google colab notebook.
E.g.
my_dat = ZipFile('/content/drive/MyDrive/some/file/structure/dat.zip', 'r')
Is there a quick way to "copy as path" or otherwise get the file path to the clipboard as quickly as possible from google drive?
My current method is to manually type up the file path, which is very tedious when doing it repeatedly for files deep down in directories. Basically all I need is a way to quickly and easily have 'MyDrive/some/file/structure/dat.zip' on my clipboard (e.g. similar to here), just without manually typing it.
I made my own library to make it easier.
!pip install kora
from kora.drive import get_path
p = get_path(file_id)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With