--- title: "Adding files and folders exclusions to malware protection processing" slug: "adding-files-and-folders-exclusions-to-malware-protection-processing" updated: 2026-08-28T06:17:09Z published: 2026-09-08T19:11:50Z canonical: "docs.trellix.com/adding-files-and-folders-exclusions-to-malware-protection-processing" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Adding files and folders exclusions to malware protection processing You can use the Web UI or the API to add a list of file and folder exclusions to malware protection processing Modify the to add a list of file and folder exclusions for all of your host endpoints. Modify your custom policies to add a list of file and folder exclusions for select host sets in your environment. ### Important File and folder exclusions are supported on hosts using Endpoint Security (HX) xAgent version 24 or later only. Excluding files or folders from malware protection processing is not recommended because it restricts the files and folders that malware scans. Follow these guidelines when adding file or folder paths to the Malware Protection exclusion list: - ### Important System environment variables are not supported. User-specific environment variables (those that include the user name in their expanded path), such as %APPDATA% or %USERPROFILE%, are not supported. You cannot specify which user the environment variable applies to, so it may expand to a value that is not necessarily the user logged onto the host endpoint. The following table lists examples for excluding files and folders from Malware Protection processing. Reference these examples when adding file and folder excludedFile paths to your Malware Protection exclusion list. | Exclusion Method | Exclusion Example | | --- | --- | | Exclude a specific file name. | `myfile` | | Exclude a specific file name located in a specific directory. | `C:\Users\Admin\Documents\myfile.txt` | | Exclude all files with a specific extension in all directories. | `*.TXT` | | Exclude all files in a specific directory. | `C:\Users\Admin\Documents` | | Exclude all files and sub directories in a specific directory. | `C:\Users\Admin\Documents\` or `C:\Users\Admin\Documents\*` Both paths are equivalent. | | Exclude all files and sub-directories in a specific directory for all users directories. | `C:\Users\*\Documents\*` | | Exclude all files with a specific extension located in a specific directory for all users directories. | `C:\Users\*\Documents\*.doc` | | Exclude all files in a specific directory for all users directories. | `C:\Users\*\Documents\*.*` | | Exclude a specific file in all users directories that start with a specific directory name. | `C:\Users\Name*\Documents\file.txt` | | Exclude a specific file in all users directories that start with a specific directory name followed by a single character. | `C:\Users\Name?\Documents\file.txt` | This section covers how to use the Web UI to modify the to add or remove file and folder exclusions from malware protection processing. - [Adding File and Folder Exclusions for All Endpoints](/docs/adding-file-and-folder-exclusions-for-all-endpoints) - [Adding File and Folder Exclusions for Selected Host Sets](/docs/adding-file-and-folder-exclusions-for-selected-host-sets) :