How do I mount rclone using a .cmd file that's in a different folder

What is the problem you are having with rclone?

I'm trying to create a cmd file that mounts rclone, but I want to group all the cmd files together causing them to be in a different folder.
The currently working cmd files are located here with rclone software
D:\Tools For Games\Mount Google Drives\Rclone

But if I move the cmd files into here (for better organising ) it no longer works
D:\Tools For Games\Mount Google Drives\Rclone\CMD File

What is your rclone version (output from rclone version)

rclone v1.53.3

  • os/arch: windows/amd64
  • go version: go1.15.5

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

Windows 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 mount GoogleDrive: U: --vfs-cache-max-size 10G --cache-dir "D:\Tools For Games\Mount Google Drives\Rclone\Cache Folder" --vfs-cache-mode full

for my scripts i set variables to the location of rclone.exe and the config file

set rcmd=C:\data\rclone\scripts\rclone.exe
set rclone_config=c:\data\rclone\scripts\rclone.conf

and use it like so
%rcmd% ls remote:

1 Like

Using the rclone path in the env variable has the same effect right?

Or there are benefits pointing to rclone the way you do?

not sure what you mean, as my example uses environment variables.

Sorry I am very new to command prompt.

set rcmd=C:\data\rclone\scripts\rclone.exe

Do I replace the "C:\data\rclone\scripts\rclone.exe" with the location of my scripts or the location of rclone?

the location of the rclone.exe

the goal is to enable a script to be located in any folder.
the way to do that is to hard code the path of rclone.
then the script, no matter where is is located can find rclone.

Sorry I was not clear, I mean global system env variables, so in the script you can just use 'rclone' instead of store the value of the path in an env variable in the script.

you can add the folder that rclone is located in the system variable path.
or set a global or per-user variable.

i am not a fan of that.
instead i have a template script for rclone, then when i need to write a new script, i start with that template.

This is a little confusing

So for

set rcmd=C:\data\rclone\scripts\rclone.exe

I replace the "C:\data\rclone\scripts\rclone.exe" with the rclone file location

and for

set rclone_config=c:\data\rclone\scripts\rclone.conf

I replace c:\data\rclone\scripts\rclone.conf witht the scripts location

finally create a .cmd file that says

%rcmd% ls remote:

to be able to use the scripts in a different folder?

no, put the location of the config file.

then put it all into the one .cmd file.

set rcmd=C:\data\rclone\scripts\rclone.exe
set rclone_config=c:\data\rclone\scripts\rclone.conf
%rcmd% ls remote:

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