Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rclone makes new folder when transferring content that is "shared with me" (google drive) #2675

Closed
ealgase opened this issue Oct 20, 2018 · 17 comments

Comments

@ealgase
Copy link

ealgase commented Oct 20, 2018

What is the problem you are having with rclone?

On my Google Drive, I have a folder named Backups. When I copy files from my computer to that folder, the program is fine. However, when I copy files from a shared with me folder, it makes a new Backups folder.

rclone copy --drive-shared-with-me "Drive:example shared with me.txt" Drive:Backups is an example of what will create a new folder.

What is your rclone version (output from rclone version)

rclone v1.43.1
- os/arch: windows/amd64
- go version: go1.11

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10, 64 bit

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy --drive-shared-with-me "Drive:Shared Folder/Shared Subdirectory" Drive:Backups

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2018/10/20 12:45:52 DEBUG : rclone: Version "v1.43.1" starting with parameters ["rclone" "--drive-shared-with-me" "copy" "Drive:example shared with me.txt" "Drive:Backups" "-vv"]
2018/10/20 12:45:52 DEBUG : Using config file from "C:\\Users\\mostd\\.config\\rclone\\rclone.conf"
2018/10/20 12:45:53 DEBUG : example shared with me.txt: Couldn't find file - need to transfer
2018/10/20 12:45:56 INFO  : example shared with me.txt: Copied (server side copy)
2018/10/20 12:45:56 INFO  :
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 0
Checks:                 0 / 0, -
Transferred:            1 / 1, 100%
Elapsed time:        4.2s

2018/10/20 12:45:56 DEBUG : 4 go routines active
2018/10/20 12:45:56 DEBUG : rclone: Version "v1.43.1" finishing with parameters ["rclone" "--drive-shared-with-me" "copy" "Drive:example shared with me.txt" "Drive:Backups" "-vv"]
@ncw
Copy link
Member

ncw commented Oct 20, 2018

Originally from the forum::

Ah, I see. The --drive-shared-with-me hides the non shared with me stuff so rclone doesn’t see the existing folder and creates a duplicate. I think the idea behind the flag is flawed but I can’t think of a better way right now… Maybe the shared with me files should appear in a subdirectory. I’ve been trying to avoid that though as it will really complicate things.

@ncw ncw added this to the v1.45 milestone Oct 20, 2018
@ealgase
Copy link
Author

ealgase commented Oct 20, 2018

My suggestion would be to have the --drive-shared-with-me flag have to be passed immediately before the remote name (so rclone --drive-shared-with-me ls Drive: wouldn't apply the --drive-shared-with-me flag to Drive:). I'm not sure how feasible that is, however.

@ncw ncw modified the milestones: v1.45, v1.46 Nov 24, 2018
@ncw ncw modified the milestones: v1.46, v1.47 Feb 9, 2019
@aldones
Copy link

aldones commented Feb 23, 2019

It there any sort of workaround for this issue? Having some serious problems with it right now.

@ealgase
Copy link
Author

ealgase commented Feb 23, 2019

Add the shared folder to your drive and then copy the contents in.

@ncw ncw modified the milestones: v1.47, v1.48 Apr 15, 2019
@ncw ncw modified the milestones: v1.48, v1.49 Jun 19, 2019
@ncw ncw modified the milestones: v1.49, v1.50 Aug 27, 2019
@xyou365
Copy link

xyou365 commented Sep 8, 2019

Add the shared folder to your drive and then copy the contents in.

I have 100 Google accounts. My god.

@ncw ncw modified the milestones: v1.50, Known Problem Nov 14, 2019
@renox92
Copy link

renox92 commented Apr 1, 2020

Add the shared folder to your drive and then copy the contents in.

And thanks to google that is no longer an option now...

@guohaiping
Copy link

Cannot add the shared folder to my drive now

@renox92
Copy link

renox92 commented Apr 5, 2020

Cannot add the shared folder to my drive now

Turns out there's also Shift+Z that can do that and it still works, for now.

@guohaiping
Copy link

Cannot add the shared folder to my drive now

Turns out there's also Shift+Z that can do that and it still works, for now.

Shift+Z solved my problem, thanks

@ly2314
Copy link

ly2314 commented Aug 12, 2020

Seems Shift + Z is not working now.
My drive icon is grayed out and becomes not select-able.
Is there any timeline for this fix?

@renox92
Copy link

renox92 commented Aug 13, 2020

Seems Shift + Z is not working now.
My drive icon is grayed out and becomes not select-able.
Is there any timeline for this fix?

Works for me. Are you sure the file/folder is sharable? There are 2 icons for shared files: icon with 2 people, and an icon of a drive with those 2 people on it. You can Shift+Z the first one, but not the second one.

@ly2314
Copy link

ly2314 commented Aug 13, 2020

Seems Shift + Z is not working now.
My drive icon is grayed out and becomes not select-able.
Is there any timeline for this fix?

Works for me. Are you sure the file/folder is sharable? There are 2 icons for shared files: icon with 2 people, and an icon of a drive with those 2 people on it. You can Shift+Z the first one, but not the second one.

Thank you for the reply. For some unknown reason it didn't work in the morning, but it works now.

@ivandeex
Copy link
Member

ivandeex commented Feb 9, 2021

@ealgase Does the problem reproduce with rclone 1.54 and modern Google Drive?

@JohnnyKing94
Copy link

I can confirm that it's still present today. The only workaround is to use the shortcut.

@ncw
Copy link
Member

ncw commented Jul 7, 2021

This can now be fixed using the rclone connection string syntax.

Instead of

rclone copy --drive-shared-with-me "Drive:example shared with me.txt" Drive:Backups

write

rclone copy "Drive,shared_with_me:example shared with me.txt" Drive:Backups

and all should be well.

This example is in the docs here: https://rclone.org/docs/#connection-strings

So I think this isssue can be closed.

@1024mb
Copy link

1024mb commented Oct 3, 2021

@ncw That does works, tested it with 1.56.2 and all is good, I don't have any more duplicated directories. Thanks.

@ivandeex
Copy link
Member

ivandeex commented Oct 4, 2021

solved

@ivandeex ivandeex closed this as completed Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants