Rclone auto mount at startup

This is working for me.

In a notepad i entered the following:

@echo off
start "C:\path to\cmd.exe" rclone mount --allow-non-empty --allow-other --cache-db-purge remote: C:\folder
exit

Saved as, with name startup.bat, then closed it.
Then I created a shortcut file of the .bat file.
And downloaded RBTray and also created a shortcut file of RBTray.exe

Enter Winkey+R > shell:startup > copy-pasted both shortcut files

After bootup, 'right-click' on the minimize button on cmd window to
minimize cmd into system tray.

hello,
thanks for taking the time to create a howto.
but please consider that:

  • --allow-non-empty does nothing on windows.
    as per the documentation
    --allow-non-empty Allow mounting over a non-empty directory (not Windows).

  • --allow-other does nothing on windows. i know this from testing myself.

  • --cache-db-purge is for a cache backend, not for a mount, and which really should not be used unless there is a specific reason to do so
    "https://rclone.org/cache/#status"

  • shell:startup have you tested this?
    as i understand it, that will run a batch file, if and only if a user has logged on, not at system startup.
    so what about command line only versions of windows servers, which often a user does not login at system startup such as windows server nano and the windows server hyper-v edition, which has no shells, no gui, no system tray to run RBTray, no desktop, no icons, no windows explorer, no control panel and so on.

that is why, on micro$oft windows, the best way to run a process as system startup is task scheduler or perhaps nssm.

as per task scheduler, there is a difference between run a batch file as

  • system startup
    and
  • after a user log in manually

image

image

perhaps you can tweak your settings and turn it into a wiki,
i have created several wikis such as

^ He is absolutely correct.

The shell:startup command works, the only reason for it is because I couldn't even get to install nssm. And couldn't get Task Scheduler to open cmd and also enter a command.
I posted what worked for me but it looks like it a very cheap no-no way to do it. I basically copy pasted from anywhere until it worked for me with no knowledge.

I was so happy it worked. If you can imagine. If that's an excuse.

yes, i respect that :upside_down_face:

post some screenshots of task scheduler.
what was the ''last run result"

post the command you want to run and i will show you how to make it work.

Annotation 2020-07-05 114524

Edited the bat file command to
rclone mount gcache: C:\folder

Task Scheduler to open the .bat file and not cmd and it's working now. Thanks.

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