Can Rclone mount FTP servers as local drives without sync?

Yeah lol I wish I could but Im really just 17 actually, it seems like a really solid software tho <3

When using "start" you don't need to have a script for each mount necessarily. you can open rclone directly with the relevant parameters all inside the command.

But find it easier to roganize you certainly can have a script from each (with all the paramters) and start those scripts instead

like:
start /min "Mydrive1" MOUNT_Mydrive1.bat

Thanks! Would something like

start /min /b "Survival" rclone mount Survival: X:
start /min /b "Bedwars" rclone mount Bedwars: Z:

work?

start does not start other .cmd files, it starts the command that comes after the start, in a new cmd window and then allows the next line of code to be executed.

as you know now, in a .cmd file, when exectuted, the first line of code is executed and then the next line is executed until all lines are executed.

but rclone mount, when executed, will continue to run and not exit and thus stops the .cmd file from executing the next line.

as an experiment, create a new .cmd named mount-test.cmd and and run it.
you will noticed that only the first mount is executed and the scripts get stuck.

rclone mount Survival: X:
rclone mount Bedwars: Z:

Yeah I actually gave that a try before I came back to the forum today xD Good info

be adventurous and try it yourself first.

1 Like

It would work, but you can only have 1 title for each window - so if you use /b to run them in the same window then it will just end up having the last title that you used. Also the /min command won't do anything when you aren't opening a new window either.

If you want the first script that you run to auto-minimze then you can either set that in the file's properties - or cpypaste this at the top of the script that will do this for you:

:: If window is not minimized, restart it as minimized
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit

Note - if you ever need to run your script as a service later on as you learn more, do not use this snippet as it can make problems (but then you have no need to minimize it either since a service window will be invisible anyway).

Thanks :smiley: I will add that last example to the .cmd file that I use to mount all FTPs

EDIT: Yep, now its just 1 window, which by default minimizes itself 10/10

@thestigma, that is a nice line of code.

i am a big fan of this website with about 200 free utilities https://nirsoft.net/ and this one command in particular.
https://nircmd.nirsoft.net/exec2.html

Not an original by me I'm afraid. I'm not that pro :slight_smile:
But at least I can actually decipher it now now unlike before, so I guess I am improving.

But you don't really need to be an expert and reinvent the wheel to make decent scripts. There is a wealth of information out there on how to accomplish everything under the sun in terms of both batch and bash - so if you just know what to search for you can usually find what you need - then use your more basic knowledge to stitch things together to form a relatively complex script.

I used some tricks I learned recently to multi-thread my regular maintenance and mounting scripts for example - so that the effective running time is much much shorter. That was kind of neat :smiley:
I have definitely leveled up a couple of levels from "noob" in batch scripting just for use with rclone related stuff :stuck_out_tongue:

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