Question: Let's say you want to temporarily exclude a **.config** file from being applied as a patch by Sitecore. Normally, you would either:

* Delete the file;
* Or rename it to have an extension different from **.config**.

Is there any other way of disabling a **.config** file? I don't want to change the file name or its contents (due to deployment process intricacies).

Answer: 
You can set the "Hidden" file attribute. Sitecore will not patch in any hidden files, even if they have the **.config** extension. The same is also true for folders, setting the "Hidden" attribute will mean the folder is not processed and the files contained within will not be loaded either.

[![Hidden property](https://i.stack.imgur.com/k16sj.png)](https://i.stack.imgur.com/k16sj.png)

You can find the exact code in `LoadAutoIncludeFiles()` method in `Sitecore.Configuration.ConfigReader` class:

```cs
protected virtual void LoadAutoIncludeFiles(ConfigPatcher patcher, string folder)
{
    if (!Directory.Exists(folder))
      return;
    foreach (string file in Directory.GetFiles(folder, "*.config"))
    {
        if ((File.GetAttributes(file) & FileAttributes.Hidden) == (FileAttributes) 0)
          patcher.ApplyPatch(file);
    }
    foreach (string directory in Directory.GetDirectories(folder))
    {
        if ((File.GetAttributes(directory) & FileAttributes.Hidden) == (FileAttributes) 0)
          this.LoadAutoIncludeFiles(patcher, directory);
    }
}

```

NOTE: The above is decompiled code and I have modified it for berevity.
Wrap the context in comment tags. Or you could drop another patch file in below it to overwrite that patch. Maybe those are obvious, but figured I would throw them out anyways.