could anyone please inform me how to automatically get a shareable link of a file in our google drive using Colab notebook?
Thank you.
could anyone please inform me how to automatically get a shareable link of a file in our google drive using Colab notebook?
Thank you.
You can use
xattr
to get file_idHere I access my notebook file at
/Colab Notebooks/R.ipynb
and make a link to open it in Colab.If you look into the documentation you can see a section that explain how to list files from Drive.
Using that and reading the documentation of the library used, I've created this script:
This is currently listing all files and providing a link to it.
You can then edit the function to find a specific file instead.
Hope this helps!