How to Stop Windows Defender from Deleting Files in Windows 11

Oct 24, 2025

Windows Defender, now known as Microsoft Defender Antivirus, is built into Windows 11 to automatically detect and remove potentially harmful files. However, sometimes it can mistakenly delete legitimate files — such as installers, scripts, or project data — labeling them as threats.

Free Download

Home >  How To >  How to Stop Windows Defender from Deleting Files in Windows 11

Windows Defender is a built-in security tool that protects your computer from viruses, malware, and potentially unwanted programs. However, sometimes it may mistakenly identify safe files as threats and delete or quarantine them. If you find that Defender is deleting important files automatically, don’t worry—you can stop this behavior or recover deleted files by following the methods below.

1. Add Exclusions in Windows Security

Adding an exclusion allows Windows Defender to skip specific files, folders, file types, or processes during scans.

Step 1. Open the Windows Security Settings

1. Press Win + I to open Settings.

2. Go to Privacy & Security > Windows Security > Virus & threat protection.

3. In the new window, select Manage settings under Virus & threat protection settings.

Step 2. Add Files or Folders to Exclude

1. Scroll down and click Add or remove exclusions under the Exclusions section.

2. Click Add an exclusion, then choose File, Folder, File type, or Process.

3. Select the file or folder you want to exclude.

4. Once added, Windows Defender will no longer scan or delete those excluded items.

2. Temporarily Disable Real-Time Protection

If you need to install or run a trusted program that Defender keeps blocking, you can temporarily turn off real-time protection.

Step 1. Access Real-time Protection Settings

In Windows Security, go to Virus & threat protection > Manage settings.

Step 2. Turn Off Real-time Protection

1. Find the Real-time protection switch and toggle it Off.

2. When prompted by User Account Control, click Yes to confirm.

3. When your work is complete, turn Real-time protection back On to keep your system secure.

3. Submit the File to Microsoft for Analysis

If a file is repeatedly flagged and deleted even though it’s safe, report it to Microsoft so they can review and fix the detection issue.

1. Visit the Microsoft Security Intelligence Submission portal.

2. Upload the file and provide details about the issue.

How to Recover Files Deleted by Windows Defender

If Windows Defender has already deleted your files, don’t panic. You may still be able to recover them. Windows Defender typically quarantines suspicious files before permanently deleting them, and if they’re not there, you can use a recovery tool to restore them.

Method 1. Restore Files from Windows Defender’s Quarantine

When Windows Defender detects a threat, it typically doesn't delete it immediately. Instead, it moves the file to a special, secure folder called Quarantine, where it is rendered harmless but can be restored.

Step 1. Open Protection History

1. Open Windows Security and select Virus & threat protection.

2. Scroll down and click Protection history under Current threats.

Step 2. Restore the File

1. In the Filters, select Quarantined Items.

2. Check if the deleted files you want are present. If yes, click Actions > Restore.

Method 2. Recover Deleted Files with Wise Data Recovery

If your file isn’t in Quarantine, it may have been permanently removed. In that case, you can use Wise Data Recovery to scan your drive and recover it.

Step 1. Launch Wise Data Recovery

Download Wise Data Recovery and install it. Then open Wise Date Recovery.

Step 2. Scan the Drive

On the main interface, select the drive where your deleted file was originally stored and start the scan.

Step 3. Preview and Recover

1. Wait for the scan to complete, this may take a few minutes depending on drive size.

2. Browse through the results or use the search box to locate your file.

3. Select the file(s) you want and click Recover.

4. Save the recovered file to a different drive to prevent overwriting data.

Conclusion

Windows Defender offers reliable protection, but false positives can be frustrating. By adding exclusions, disabling real-time protection temporarily, or reporting files to Microsoft, you can stop Defender from deleting files unnecessarily. And if important data is already removed, check the Quarantine or use Wise Data Recovery to bring it back with ease.

FacebookTwitter

Additional Related Articles

wisecleaner uses cookies to improve content and ensure you get the best experience on our website. Continue to browse our website agreeing to our privacy policy.

I Accept