Skip to content

How to list files from a Shared Drive and download files from a Shared Drive? #46

@vadimkantorov

Description

@vadimkantorov

I successfully created fs instance using the script in README:

import gdrivefs

# use this the first time you run
# token = 'browser'
# use this on subsequent attempts
token = 'cache'
fs = gdrivefs.GoogleDriveFileSystem(token=token)

# how to do something similar for a shared drive via its name? or via a given folder ID?
# print(fs.ls(...))
# specifying it as follows does not work and fails with 404 gdrivefs.GoogleDriveFileSystem(root_file_id="MYSHAREDDRIVEFOLDERIDHERE", token=token).ls("") 

How can I list the contents of a shared drive (e.g. via folder ID, like found in URLs like https://drive.google.com/drive/folders/MYSHAREDDRIVEFOLDERIDHERE)?

(Same question for using with gdrive:// protocol without explicit import of gdrivefs)

Thanks!


Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions