# How Does CopyStorm Search for Configuration Files?

There are a number of XML configuration files that can be used to override default CopyStorm behavior. This article describes the approach CopyStorm uses to find configuration files.

When CopyStorm searches for a configuration file, it looks in four places:

1. Configuration files embedded within the CopyStorm application.
   1. CopyStorm always looks here first.
2. Configuration files in the “config” subdirectory of the CopyStorm installation.
   1. CopyStorm always looks here.
3. Configuration files in the directory specified by the Configuration tab “Config Directory” option within the “External Configuration” section.
4. Configuration files in the directory specified by the “-config” command line argument.
   1. CopyStorm looks here ONLY IF the Advanced tab setting is blank.

If a configuration file is found in multiple locations, all are loaded in the order listed above. Later loaded files will override any configuration from earlier files.

Documentation on available XML configuration files can be found on [this page](https://learn.capstorm.com/reference/configuration-files).

## Best Practices

Capstorm recommends the following best practices:

* Keep each CopyStorm configuration file in its own directory OUTSIDE of the CopyStorm installation directory.
  * This will make the CopyStorm upgrade process simpler.
* If you need custom XML configuration files then:
  * Store them in the same directory as the corresponding .copyStorm configuration file.
  * Set the Configuration tab “Config Directory” parameter in your .copyStorm file to point to the directory where the .copyStorm file is located.


---

# 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://learn.capstorm.com/reference/configuration-files/how-does-copystorm-search-for-configuration-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.
