> For the complete documentation index, see [llms.txt](https://kevinnitro.gitbook.io/rclone-mount-for-windows/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kevinnitro.gitbook.io/rclone-mount-for-windows/silentcmd/create-batch-script.md).

# Create batch script

{% hint style="info" %}

* 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 😪
  {% endhint %}

<details>

<summary>Create a Batch script file</summary>

1. **Create** a batch file *(Ex: Mount.bat)*\
   ![](https://3792379274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTFN5jOg06m7Rumtrp6Ht%2Fuploads%2FS5PdAPfdF7meh0W4czdi%2Fimage.png?alt=media\&token=161fe9b2-61e2-4ce9-b0e2-1e02bba85fe8)\
   ![](https://3792379274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTFN5jOg06m7Rumtrp6Ht%2Fuploads%2F2SWfhHSIFJjkgsRwjTiw%2Fimage.png?alt=media\&token=5c20b181-e205-492d-ab50-6e328b40d45f)
2. Edit it and put the below script inside the batch file\
   *(Ex: Notepad, Visual Studio Code,...)*

{% code title="Mount.bat" overflow="wrap" lineNumbers="true" fullWidth="false" %}

```batch
: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
```

{% endcode %}

3. Replace <mark style="color:purple;">`your_rclone_command`</mark> in the script above 👆. You can mount multiple remotes just enter after <mark style="color:orange;">**`start SilentCMD`**</mark> command

</details>

<details>

<summary>Copy script file path</summary>

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

Ex: `D:Rclone mount/Mount.bat`

</details>

<details>

<summary>Explain the script <em>(Needn't to read 😐)</em></summary>

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 <mark style="color:purple;">`your_rclone_command`</mark>
3. After <mark style="color:orange;">2 seconds</mark> 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 😤

</details>

***

{% hint style="info" %}
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](/rclone-mount-for-windows/silentcmd/setup-shortcut/create-shortcut.md) step
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kevinnitro.gitbook.io/rclone-mount-for-windows/silentcmd/create-batch-script.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
