os/version: Microsoft Windows 11 Pro 22H2 (64 bit)
os/kernel: 10.0.22621.755 (x86_64)
os/type: windows
os/arch: amd64
go/version: go1.19.2
go/linking: static
go/tags: cmount
I am trying to mount multiple drives on Windows within a single batch script. I have 2 remotes in my config for AWS S3. And when I create my batch script I have 2 lines, which are as follows:
C:\rclone\rclone.exe mount remote01:bucket01 * --vfs-cache-mode full
C:\rclone\rclone.exe mount remote02:bucket02 * --vfs-cache-mode full
I'm only using full cache mode for testing right now. Still learning the ins and outs of rClone seeing how it all works. Trying to streamline a better process than using cloudberry as we are wanting to pass through cli creds instead of keys, which thankfully rClone does.
Anyways, when I run the above bat script, it only maps the top line and doesn't run the second one at all. Any ideas why? Am I missing something?
I did add that to the mount commands but all it did was minimized it and still didn't continue running the second line so only the first one was mounted.
sorry to jump in, but if you use --no-console, how do you unmount the remote? Do you have to kill the rclone process in task manager (and if so, how do you know which rclone process is for which remote? and will ending the task allow rclone to do any last minute cleanup like cache flushing and so on?)
you can kill it with task manager.
take a look at my screen snippet from task manager, you can see the name of the apps and optionally see the command line.
as far as i know, if you kill the rclone.exe, there is no cache cleanup and so on.
the next time rclone mount is run, rclone will cleanup cache, upload files, etc..
Here is the log: (paths changed of course) it kept registering links inside it so newbs can only post 2 links which I am not trying to post any. So had to fix that. But hope this helps.
The script I ran was posted in original post. But here it is:
C:\rclone\rclone.exe mount --no-console remote01:bucket01.com/ * --vfs-cache-mode full
C:\rclone\rclone.exe mount --no-console remote02:bucket02.com/ * --vfs-cache-mode full
I just expand my console window. All the --no-console does in windows is just minimizes the console window. In my experience at least. So I just expand and close or right click and close if I am done.
I know there are other ways to hide it and I will work on those when I get to that. My main thing right now is trying to have map multiple drives/buckets to my file explorer.
I am running it as a .bat script currently. It works great for one drive. I just want to capitalize on it and map more than one in one script.
Maybe simply adding start "" in front of the commands will give you what you want:
start "" C:\rclone\rclone.exe mount --no-console remote01:bucket01.com/ * --vfs-cache-mode full
start "" C:\rclone\rclone.exe mount --no-console remote02:bucket02.com/ * --vfs-cache-mode full
Adding the start "" at the beginning actually worked. Granted it opened 2 terminal windows but that's fine. Easy fix. Not sure how I didn't think of that. Thanks!