# GDrive: unable to access all shared folders if they have the same name using rclone

**URL:** <https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259>\
**Category:** Help and Support\
**Created:** [March 22, 2019, 2:21pm UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259 "2019-03-22T14:21:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![alper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@alper](https://forum.rclone.org/u/alper)\
**Post date:** [March 22, 2019, 2:21pm UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/1 "2019-03-22T14:21:01Z")

</div>

I am using rclone to access shared files on my google drive.

For example a Google Drive user shares two folder that has the same name. Hence, I am unable to access those both folders through `rclone`; I am only able to obtain the latest shared folder.

Those two folders are shared with my Google Drive.

```
$ ls foo
hello.txt
$ ls foo
goodbye.txt

```

On my rclone, I can only obtain the latest shared folder :

```
$ rclone ls remote: --drive-shared-with-me
   201942 foo/hello.txt
   201942 foo/hello.txt
$ rclone ls remote:foo --drive-shared-with-me
   goodbye.txt

```

[Q] Is there any way to handle this issue?

---

<div class="post-metadata">

**Author:** ![calisro](https://forum.rclone.org/user_avatar/forum.rclone.org/calisro/32/3130_2.png) [@calisro](https://forum.rclone.org/u/calisro)\
**Post date:** [March 22, 2019, 2:26pm UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/2 "2019-03-22T14:26:58Z")

</div>

I don’t think so. They look to rclone like duplicates. There is an issue on enhancing rclone to deal with duplicates which might help as then you could select which copy to deal with

---

<div class="post-metadata">

**Author:** ![alper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@alper](https://forum.rclone.org/u/alper)\
**Post date:** [March 22, 2019, 2:32pm UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/3 "2019-03-22T14:32:38Z")

</div>

Thanks @calisro for the response.

I was using ([https://github.com/gdrive-org/gdrive](https://github.com/gdrive-org/gdrive)) that was allowing me to download folder through their unique ID: `gdrive download --recursive ID_of_the_folder`. I guess that option is not available through `rclone`.

```
$ gdrive list
    Id Name Type Size Created
    14IC1hufjb5WArh_75_G_dvmZgmlIK50V doo bin 2019-03-22 16:37:27
    1veladRJ4mfm6t0W9mntb8FILG-fqgQH2 doo bin 2019-03-22 16:37:00 

```

As I understand, if there is duplicated shared folders with same folder name, I could only view the latest shared folder.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [March 25, 2019, 10:57am UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/4 "2019-03-25T10:57:37Z")

</div>

> [@alper](#):
>
> I was using ([https://github.com/gdrive-org/gdrive](https://github.com/gdrive-org/gdrive)) that was allowing me to download folder through their unique ID: `gdrive download --recursive ID_of_the_folder` . I guess that option is not available through `rclone` .

You can do that with rclone too if you use

```
  --drive-root-folder-id string ID of the root folder

```

---

<div class="post-metadata">

**Author:** ![alper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@alper](https://forum.rclone.org/u/alper)\
**Post date:** [March 25, 2019, 11:16am UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/5 "2019-03-25T11:16:03Z")

</div>

I am getting following error @ncw

```
$ rclone ls remote:foo --drive-root-folder-id string
2019/03/25 14:14:08 ERROR : : error listing: couldn't list directory: googleapi: Error 404: File not found: ., notFound
2019/03/25 14:14:08 Failed to ls: couldn't list directory: googleapi: Error 404: File not found: ., notFound

```

If I able to obtain the `ID of the root folder`, by using it can I download its directory using `rclone`?

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [March 25, 2019, 11:51am UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/6 "2019-03-25T11:51:41Z")

</div>

> [@alper](#):
>
> If I able to obtain the `ID of the root folder` , by using it can I download its directory using `rclone` ?

Yes, just paste it in where you wrote `string` above, so

```
rclone ls remote:foo --drive-root-folder-id '234JGfyhGFHF676767676'

```

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [March 25, 2019, 11:52am UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/7 "2019-03-25T11:52:02Z")

</div>

Oh and you may still need `--drive-shared-with-me` not sure

---

<div class="post-metadata">

**Author:** ![alper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@alper](https://forum.rclone.org/u/alper)\
**Post date:** [March 25, 2019, 12:28pm UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/8 "2019-03-25T12:28:01Z")

</div>

On my google-drive I have created a folder names foo, please note that its not empty.

Its folderID is =\> “1aHL0-5rI1fyHuflDXJV5inYJ9ED5nyHA”

Following line worked: (I had to remove `foo` after `remote:`). I think there is no need to use `--drive-shared-with-me`.

`$ rclone ls remote: --drive-root-folder-id '1aHL0-5rI1fyHuflDXJV5inYJ9ED5nyHA'`

---

<div class="post-metadata">

**Author:** ![alper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@alper](https://forum.rclone.org/u/alper)\
**Post date:** [March 26, 2019, 9:50am UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/9 "2019-03-26T09:50:37Z")

</div>

In addition to that, through `rclone` with its `--drive-root-folder-id`;  
=\> Is it possible to obtain its info such as is it a Folder or gzip (Mime Type)?

```
$ gdrive info 1veladRJ4mfm6t0W9mntb8FILG-fqgQH2
Id: 1veladRJ4mfm6t0W9mntb8FILG-fqgQH2
Name: result-0xf2129928bd1e6f4aa1ad131a37db2e55810cbbff-0.tar.gz
Path: result-0xf2129928bd1e6f4aa1ad131a37db2e55810cbbff-0.tar.gz
Mime: application/gzip
Size: 4.7 KB
Created: 2018-05-03 19:23:38
Modified: 2018-05-03 19:23:38
Md5sum: ba834907726ce300c3e37048e32c1c65
Shared: True
Parents: 1KFlwAZUHXZ9DWS183cwViWJ5tf_51Smi
ViewUrl: https://drive.google.com/file/d/1veladRJ4mfm6t0W9mntb8FILG-fqgQH2/view?usp=drivesdk
DownloadUrl: https://drive.google.com/uc?id=1veladRJ4mfm6t0W9mntb8FILG-fqgQH2&export=download

```

* * *

`gdrive` is able to return the information, can `rclone` do this as well? @ncw

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [March 26, 2019, 10:31am UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/10 "2019-03-26T10:31:44Z")

</div>

> [@alper](#):
>
> In addition to that, through `rclone` with its `--drive-root-folder-id` ;  
> =\> Is it possible to obtain its info such as is it a Folder or gzip (Mime Type)?

You can use [rclone lsf](https://rclone.org/commands/rclone_lsf/) or [rclone lsjson](https://rclone.org/commands/rclone_lsjson/) to read the mime type

---

<div class="post-metadata">

**Author:** ![alper](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@alper](https://forum.rclone.org/u/alper)\
**Post date:** [March 26, 2019, 10:58am UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/11 "2019-03-26T10:58:41Z")

</div>

I am not sure why but I guess `--drive-root-folder-id` seems like does not working. @ncw

```
$ gdrive info 1xnGc-FFWgYu2xflIWg9lYjnqWkyb0siR
Id: 1xnGc-FFWgYu2xflIWg9lYjnqWkyb0siR
Name: b5431f59c7a6fbcc2003362227044d07.tar.gz
Path: b5431f59c7a6fbcc2003362227044d07/b5431f59c7a6fbcc2003362227044d07.tar.gz
Description: b5431f59c7a6fbcc2003362227044d07.tar.gz
Mime: application/gzip
Size: 540.0 B
Created: 2019-03-26 13:48:28
Modified: 2019-03-26 13:48:30
Md5sum: b5431f59c7a6fbcc2003362227044d07
Shared: True
Parents: 1Y8LbCsojP5JADhSgbAGkV7732y7g5vC7
ViewUrl: https://drive.google.com/file/d/1xnGc-FFWgYu2xflIWg9lYjnqWkyb0siR/view?usp=drivesdk
DownloadUrl: https://drive.google.com/uc?id=1xnGc-FFWgYu2xflIWg9lYjnqWkyb0siR&export=download

$ rclone ls remote:b5431f59c7a6fbcc2003362227044d07
      540 b5431f59c7a6fbcc2003362227044d07.tar.gz

```

* * *

Following line returns empty:

```
$ rclone ls remote: --drive-root-folder-id='1xnGc-FFWgYu2xflIWg9lYjnqWkyb0siR'

```

* * *

```
$ rclone ls remote:b5431f59c7a6fbcc2003362227044d07 --drive-root-folder-id='1xnGc-FFWgYu2xflIWg9lYjnqWkyb0siR'
2019/03/26 13:57:47 ERROR : : error listing: directory not found
2019/03/26 13:57:47 Failed to ls: directory not found
```

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [March 26, 2019, 2:06pm UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/12 "2019-03-26T14:06:10Z")

</div>

> [@alper](#):
>
> I am not sure why but I guess `--drive-root-folder-id` seems like does not working.

Is that a shared folder? If so I think you'll need `--drive-shared-with-me` also

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [June 24, 2019, 2:11pm UTC](https://forum.rclone.org/t/gdrive-unable-to-access-all-shared-folders-if-they-have-the-same-name-using-rclone/9259/13 "2019-06-24T14:11:41Z")

</div>

Closed on June 24, 2019, 2:11pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
