Create batch script

  • The directory where the batch script locates doesn't matter, you can create it in any directory

  • See more about Rclone command to use it as your demand ๐Ÿ˜ช

Create a Batch script file
  1. Create a batch file (Ex: Mount.bat)

  2. Edit it and put the below script inside the batch file (Ex: Notepad, Visual Studio Code,...)

Mount.bat
:CHECK_CONNECTION
ping google.com -n 1 > nul
if %errorlevel% neq 0 (
    timeout /t 5 > nul
    goto CHECK_CONNECTION
)

start SilentCMD your_rclone_command_1
start SilentCMD your_rclone_command_2

timeout /t 2

taskkill /f /im SilentCMD.exe
  1. Replace your_rclone_command in the script above ๐Ÿ‘†. You can mount multiple remotes just enter after start SilentCMD command

Copy script file path

Copy the full path of the script above for the below step

Ex: D:Rclone mount/Mount.bat

Explain the script (Needn't to read ๐Ÿ˜)
  1. It will ping to google.com, if it fails, it will retry to ping until it successes

  2. After pinging successfully, it will start SilentCMD to run all your_rclone_command

  3. After 2 seconds of waiting, it will terminate (End task) all the SilentCMD itself

With SilentCMD, Rclone doesn't run under any terminal, cmd,... So after terminating SilentCMD, Rclone still works ๐Ÿ˜ค


And now you can click on the script to mount your remotes, but there still is a cmd window pops up and we need to make it run most silently. So, let's move to Create shortcut step

Last updated