# Automatically Opening Files

When you upload content to your Block, such as a web application, it may include folders containing large numbers of files and sub-folders. When a user accesses the content through the File Manager they risk being confused by which file it is they should open to begin using the uploaded application.&#x20;

{% hint style="info" %}
An example would be a web application with an `index.html` or `index.php` file. Alongside those files will be many other files you will not need the user to see.
{% endhint %}

Therefore, your Block provides the ability to specify a file to automatically open when a user uses the file manager to access the folder which it is stored within. Prefix the file you would like to automatically open with the string:

```
--auto-open
```

**Only users that are not logged in to the Control Panel will benefit from the automatic opening of files.** This is so that an administrator logged in to the Control Panel is able to access the folder and change the files.&#x20;

{% hint style="info" %}
Here are a few examples:

`--auto-open.jpeg`\
`--auto-open-my-original-filename.php`\
`--auto-open_anythinghere.html`
{% endhint %}

{% hint style="warning" %}
It is important to keep the original file extension on the end of your file. Otherwise, your browser will not know how to open the file.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.learnersblock.org/how-to-use-it/advanced-features/automatically-opening-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
