After searching in the forum I had been unable to find an answer. Sorry if I am a bad seeker…
I mount without issue in batch bats. I know that end of batch means unmounting.
I would like to be able to unmount wihout user intervention and in the middle of the bat so to free the drive letter and be able to mount again.
Not found a way to unmount using a rclone command.
I launch the mount as start “LETTER” rclone mount as then I launch other operations in the batch, otherwise if I do not use start rclone mount does not return to the batch until killed.
And to unmount I use, as a workaround of not having rclone unmount, TASKKILL /F /FI “WINDOWTITLE eq LETTER”
While this does the unmount, it has other quirks, such as I cannot use /B (no window) because then I cannot kill the window. Perhaps I could find other ways to launch and the kill, but was unable as today.
Anyone could recommend another wat to unmount in a batch without user intervention?
In rclone mount documentation there are ways for Linux and OS X:
Linux - fusermount -u /path/to/local/mount
OS X -umount /path/to/local/mount
I am not sure if this is posible with rclone or needs to be done a winfsp level.
I identified as interesting elements
The proper way to unmount a file system that uses WinFsp-FUSE is by sending it a Ctrl-C. On Windows this is done by calling GenerateConsoleCtrlEvent. On Cygwin you can also use kill or pkill to send it a SIGTERM , especially if you run it as a Cygwin daemon.
I don’t think there is a windows system way of umounting WinFSP, so no equivalent to umount or fusermount -u.
It might be possible to add, let’s say core/quit to the API which would quit rclone and do the unmount.