Monday 06 Feb 2023

Rclone mount

Image copyright

I was using rclone to mount a cloud volume as a drive on my PC. Instead of running a command to copy over the files, I would be able to browse, delete and copy as if the cloud drive was on my PC.

Here's the rclone command to mount the drive:

rclone mount cloud: M: --vfs-cache-mode full --volname "Cloud Drive"

I have used the volname switch to display "Cloud Drive" for the name of the mounted volume.

I was having difficulty with the mounted volume hanging, so I added the vfs-cache-mode full to allow caching - the default is off. The full options allows caching of reads and writes. Otherwise, if you want write-only caching, choose writes.

I wanted the volume to mount on start-up, so I used Windows Task Scheduler to achieve this. I wrote a script, and linked the Scheduler to that. This worked well, but I am left with an open Windows command window; if I close the window, it quits the rclone instance. I chose the "hidden" option but it still displays.

After a little research, I settled on using nircmd to run the script. It's a command line tool to run advanced options on Windows. I downloaded and extracted to my Windows folder. I ran the script using nircmd and, hey presto, it worked!

Nircmd command to execute a script and hide the cmd window.

nircmd exec hide C:\dir\mount.bat

  1. rclone manual on caching
  2. Read about the nircmd tool
  3. Read my journal entry on rclone

Backlinks: Journal:Index Journal:2023:02 Journal:2023:01:11 Journal:2023:03:08