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 make your configuration file hidden, which will cause Sitecore to NOT read that configuration file.

But, don't know how to set the hidden attribute automatically from the deployment process.

One option would be, you manually set the file properties to hidden on the server/instance and then stop the already existing file deployment to that certain folder. (But, this will also introduce a problem in case you change any configuration on those files)
Hoping this answer will help someone in the future, Sitecore 9 now has this feature. You can disable any config file or folder by Adding the patch file to a section and add the mode="Off" attribute. for example:

```
1 <add path="Sitecore.Analytics.Config" type="File" mode="Off" /> 

```

`2 <add path="zCustom" type="Folder" mode="Off" />`

for more information you can check <https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/customizing_server_configuration/disable_a_patch_file#_Disable_a_single>