Is there a way to read options from a from a file for rclone copy
or rclone move
?
what do you mean by options?
can you give an example?
Yeah like --buffer-size 32M -P --rc --rc-addr :5555 --checkers=1 --multi-thread-streams 5 --transfers=5
. Getting real tired of typing the same thing ten times everyday
sure, i can help you with that.
what version of rclone are you using?
post the output from rclone version
what is your operating system?
Raspberry Pi OS armhf
rclone v1.52.0
- os/arch: linux/arm
- go version: go1.14.3
create a batch file and put your commands inside that.
Not gonna edit a file each time
rclone copy should read input from a file like:
rclone copy -i /path/to/file
/ rclone copy --input /path/to/file
That way multiple users can access the file and use the same params
so you want one file with the rclone command, that file would not change.
and for each user, a file with options customized for that user?
each option can be set as a variable.
for example,
https://rclone.org/drive/#drive-client-id
the option
--drive-client-id
can be used as an environment variable
RCLONE_DRIVE_CLIENT_ID
No, just the appropriate read permission for other users.
That's useless because it needs to be on a per operation basis, rather than being used everywhere else where the defaults are optimal.
You could create multiple configs and set the parameters in the config. Then you can just reference the different config for each operation with --config . The other option is to have a file set the environment variables and source that file each time.
. options1
rclone copy src dest
. options2
rclone copy src dest
A 3rd option would be to create a wrapper for rclone and script what you want.
This maybe what I want. Can you provide an example of how this would look like? I presume the usage is the same i.e. --config=
?
In a file you'd store your variables. Let's call it rclone.env
RCLONE_BUFFER_SIZE=32M
RCLONE_RC=true
RCLONE_RC_ADDR=:5555
RCLONE_CHECKERS=1
RCLONE_MULTI_THREAD_STREAMS=5
RCLONE_TRANSFERS=5
#Show whats set
env | grep ^RCLONE
Then whenever you want to use those, you'd source it.
. rclone.env
rclone copy src: dest:
You can also just store the flags in the config file and use --config file.conf as you mentioned.
These variables are valid till I close the terminal, I presume?
Sort of export
I guess?
Yes unless you unset them. Or close the terminal.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.