Windows Security can ignore specific files through its exclusions settings
Windows Security (also called Windows Defender) scans your computer for threats, but sometimes it flags files you know are safe — a development tool, a legitimate program from a smaller vendor, or a file you're testing. Rather than disable the entire security system, you can tell Windows Security to skip certain files, folders, or file types. The exclusion stays in place until you remove it, and Windows Security continues protecting everything else normally.
Exclusions work by telling Windows Security "don't scan this path" or "don't scan files with this extension." The system trusts your judgment, so use this feature only for files you genuinely trust. Adding a malicious file to exclusions will prevent Windows Security from catching it.
Key Takeaways
- You can exclude individual files, entire folders, file types, or running processes through Windows Security settings without disabling the whole system.
- Exclusions are found under Virus & threat protection, then Manage settings, then Exclusions — a path you can reach in under a minute.
- Adding a folder to exclusions also excludes everything inside it, so excluding your Downloads folder will skip all files you download.
- Windows Security remembers exclusions across restarts, but you can remove any exclusion the same way you added it.
Finding the exclusions menu in Windows Security
Open Windows Security by typing "Windows Security" into the taskbar search box and clicking the result. Once it opens, click Virus & threat protection in the left sidebar — this is the main scanning and protection section.
Under Virus & threat protection, scroll down until you see Manage settings and click it. This page holds all the detailed controls for what Windows Security does and doesn't scan. Near the top, you'll see Exclusions with an option to add exclusions. Click that section to expand it.
Adding a single file to exclusions
Click Add exclusions in the Exclusions section. A menu appears with four options: File, Folder, File type, and Process. Choose File if you want to exclude one specific file.
A file browser window opens. Navigate to the file you want to exclude, click it once to select it, then click Open or Select Folder (the button name varies depending on your Windows version). Windows Security adds that file to the exclusion list immediately. The file will no longer be scanned, though Windows Security will still scan everything around it.
Excluding an entire folder and its contents
If you want to skip scanning a whole folder — for example, a development directory where you store test files — choose Folder instead of File. The same file browser opens, but this time you select a folder rather than a file inside it.
When you exclude a folder, Windows Security skips that folder and every file and subfolder inside it. This is useful for directories you access frequently and trust completely, but be cautious: excluding a folder means Windows Security won't catch a threat if something malicious ends up there later. You can always remove the exclusion if you change your mind.
Excluding a file type across your entire system
Choose File type if you want Windows Security to ignore all files with a certain extension — for example, all .exe files or all .bat files. Type the extension (without the dot) into the box that appears. Windows Security will then skip scanning any file with that extension, no matter where it is on your computer.
This approach is broader and riskier than excluding a single file or folder, because it affects your entire system. Use it only if you have a specific reason — for instance, if a legitimate program you use regularly creates .tmp files that Windows Security keeps flagging as suspicious. Even then, consider whether excluding the folder where those files live would be safer.
Excluding running programs from real-time scanning
Choose Process if you want to exclude a program that's currently running. This tells Windows Security not to monitor that program's activity in real time, though it will still scan files the program creates or modifies.
You'll see a list of programs currently running on your system. Click the one you want to exclude. This is useful if a program you trust triggers false alarms every time it runs, but use it sparingly — excluding a process means Windows Security won't watch what that program does while it's active.
Viewing and removing exclusions you've added
The Exclusions section in Manage settings shows every file, folder, file type, and process you've excluded. Each one appears as a line item with an X button next to it. To remove an exclusion, click the X button next to it. Windows Security will immediately resume scanning that file, folder, file type, or process.
You can remove exclusions one at a time as you need to, or all at once if you decide to reset your security settings. There's no limit to how many exclusions you can add, but keeping the list short makes it easier to remember what you've excluded and why.
What happens after you add an exclusion
Windows Security stops scanning the excluded file or folder right away. If Windows Security had already flagged the file as a threat, the threat notification disappears from your history. The next time Windows Security runs a full scan, it skips whatever you've excluded.
Exclusions persist even after you restart your computer or update Windows. They stay in place until you manually remove them through the same Manage settings menu. If you uninstall Windows Security or switch to a different antivirus program, those exclusions won't transfer — you'll need to set them up again in the new program if it supports exclusions.
Frequently Asked Questions
Can I exclude a file that Windows Security says is a virus?
Yes, but you should be very careful. Windows Security flags files as viruses based on patterns it recognizes as dangerous. If you exclude a file Windows Security identified as malicious, you're telling the system to stop protecting you from it. Only exclude files you've verified are safe through other means — for example, a tool you downloaded from the official vendor's website, or a file a trusted developer told you to exclude.
If I exclude a folder, does Windows Security still scan files I download into it?
No. When you exclude a folder, Windows Security skips everything in it, including new files you download or create there. If you exclude your Downloads folder, Windows Security won't scan anything you download. This is why excluding broad folders like Downloads is risky — malware could end up there and go undetected.
Will excluding a file slow down my computer?
No. Exclusions actually reduce the work Windows Security does, which might make scans slightly faster. The trade-off is that you lose protection for those specific files, so the speed gain isn't worth it unless you have a real reason to exclude something.
Can I exclude a file on an external drive or network location?
Yes. When you browse for a file to exclude, you can navigate to external drives, USB devices, or network folders the same way you would in File Explorer. The exclusion applies as long as that drive or location is connected to your computer.
What's the difference between excluding a file and disabling Windows Security?
Excluding a file tells Windows Security to skip just that file or folder while protecting everything else. Disabling Windows Security turns off all protection. Exclusions are much safer because you keep protection for the rest of your system. Only disable Windows Security if you're installing another antivirus program and need to avoid conflicts.