GDrive: How to access the "Shared with me" subdirectory/area?

Hello everyone,

Is there a way to access Google Drive’s “Shared with me” subdirectory/area?

For those that don’t know what I’m talking about, it’s the subdirectory where Google Drive’s web interface lists all directories and files that other people have shared with the logged-in account. In the web interface, it’s directly under the main Google Drive directory (ie, its “root” directory).

Here, a “rclone lsd GDRIVE:” shows all my private files and subdirectories located under my Google Drive root, except this “Shared with me” subdirectory.

I currently need just read-only access to it (although in the future read-write access would be very handy).

Thanks in advance for any tips,
– Durval.

1 Like

Indeed. Also, the folders created by Google’s “Backup and Sync” program cannot be accessed through rclone either, even if I point it to GD:Computers or something like that.

For now, the way I get around it is to use Google’s web GUI, right click on the folder I want to access from rclone, choose “Add to My Drive”. Then a copy of the folder will show up in my drive, which can be accessed by rclone.

Note that if you remove either of the two copies from Google’s web GUI, both copies will be deleted. The correct way to remove one copy is to use the property window of the Google web GUI on the right, and uncheck the link you no longer want. Then only one copy disappears.

Try the --drive-shared-with-me flag

  --drive-shared-with-me                Only show files that are shared with me

That only shows the shared with me stuff but should be helpful!

4 Likes

Hi @ncw,

I’m very happy to report that it not only worked with the ‘ls.*’ commands (lsl, lsd, etc) to *show files" as stated above, but also with the goode olde “copy” command to copy them, therefore providing me with full rclone access to my Google Drive “Shared with me” directory… what could possibly be better? :smile:

Many thanks again for the great program that is rclone. I use it daily and it never ceases to amaze me!

Just a suggestion: shouldn’t the documentation be updated in order to reflect that the –drive-shared-with-me option not only allows “showing” the contents of the “Shared with me” directory, but also gives full access to them, including copy? I can open an issue if you want, or even try to change doc file (MD, right?) myself and send you a pull request on it.

Cheers,
– Durval.

@drgreatscott, thanks for the input and the workaround, but it seems @ncw has already supplied us all with exactly what we needed (again!) :wink:

Excellent - glad it worked!

I’d be happy to accept a re-word of the docs via pull request would be perfect, but if that is too much hassle, just paste them here and I’ll put them in.

This is the only doc that needs changing any other docs you find in the rclone repo are auto generated.

Hi @ncw,

Thanks for the pointer to the specific MD file. I just forked the master rclone branch, modified the doc, and then created a pull request; for reference, it can be found here: https://github.com/ncw/rclone/pull/2035

Cheers,
– Durval.

hi durval,

do you have example of copy shard with me folder to my drive? ex) rclone copy –drive-shared-with-me ???

i am trying to copy shared with me folders to my disk. it didn’t work.


The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone copy --drive-shared-with-me aaa aaa:DIR
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
2018/02/18 12:20:51 INFO : Google drive root ‘DIR’: Modify window is 1ms
2018/02/18 12:20:51 ERROR : : error reading source directory: directory not found
2018/02/18 12:20:51 INFO : Google drive root ‘DIR’: Waiting for checks to finish
2018/02/18 12:20:51 INFO : Google drive root ‘DIR’: Waiting for transfers to finish
2018/02/18 12:20:51 ERROR : Attempt 1/3 failed with 1 errors
2018/02/18 12:20:52 ERROR : : error reading source directory: directory not found
2018/02/18 12:20:52 INFO : Google drive root ‘DIR’: Waiting for checks to finish
2018/02/18 12:20:52 INFO : Google drive root ‘DIR’: Waiting for transfers to finish
2018/02/18 12:20:52 ERROR : Attempt 2/3 failed with 1 errors
2018/02/18 12:20:52 ERROR : : error reading source directory: directory not found
2018/02/18 12:20:52 INFO : Google drive root ‘DIR’: Waiting for checks to finish
2018/02/18 12:20:52 INFO : Google drive root ‘DIR’: Waiting for transfers to finish
2018/02/18 12:20:52 ERROR : Attempt 3/3 failed with 1 errors


Hi vantobang,

Sorry for the delay, only saw your post today.

rclone is telling you it can’t read the source directory. Your post is confusing (I can’t tell whether it’s /tmp or aaa or DIR), but I’d try accessing it locally and see whether you have a permission or path problem.

Cheers,
– Durval.

--drive-shared-with-me seems like working, but if multiple folders with the same name is shared it does not show that folder. @ncw

Rclone will only show one of the shared folders if they have the same name. You’ll need to rename them to get rclone to see both of them. If you have further questions please open a new topic as this one is old now!