I have about 40 local directories on a Windows machine. I'd like to add the equivalent Shared drives (already exist) as remotes to rclone. I know how to add them one at a time but I'm not sure how to do it bulk. I have reviewed the documentation in some of the older notes ... my script kiddle skills are struggling. Does anyone have a few examples that might help add additional context?
What is your rclone version (output from rclone version)
v1.54.1
```
<!-- **STOP and READ**: Are you on the latest version of rclone? You can validate by checking the version listed here: https://rclone.org/downloads/
-->
#### Which cloud storage system are you using? (eg Google Drive)
#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)
<!-- You should use 3 backticks to begin and end your paste to make it readable. -->
```
Paste command here
```
#### The rclone config contents with secrets removed.
<!-- You should use 3 backticks to begin and end your paste to make it readable. -->
```
Paste config here
```
#### A log from the command with the `-vv` flag
<!-- You should use 3 backticks to begin and end your paste to make it readable. Or use a service such as https://pastebin.com or https://gist.github.com/ -->
```
Paste log here
```
if you are able to access all the shared drives from your gdrive account, you might only need a single remote.
use --drive-team-drive
and https://rclone.org/drive/#drives
each shared drive has a unique id
not an expert at gdrive but for each remote, you would need to go thru the process of creating a token.
if you use an alias for each remote, you might be able to workaround that.
[gdrive]
type = drive
client_id =
client_secret =
scope = drive
token =
[gdrive-shared-01]
type = alias
remote = gdrive:
team_drive = ID
That isn't quite the right syntax but the idea is sound. You'd want
[gdrive]
type = drive
client_id =
client_secret =
scope = drive
token =
[gdrive-shared-01]
type = alias
remote = gdrive,team_drive=ID1:
[gdrive-shared-02]
type = alias
remote = gdrive,team_drive=ID2:
You can use rclone backend drives gdrive: to list the names and IDs of the shared drives. Editing them into the right format for the config file shouldn't take too long.
hi,
using a connection string for a remote in a config file, interesting but also confusing.
for a command on the command line, i could see the need a connection string.
but in a config file, using my example, i would have thought that team_drive = ID would have applied to gdrive-shared-01, not gdrive and thus no need to use a connection string.
what am i missing?
The team_drive parameter applies only to the alias backend - it doesn't get passed on to the gdrive remote. It could/should maybe, but right now it doesn't.
It occurred to me that I could make an option for rclone backend drives drive: which would output in config file format with the names of the drives...