Forum Discussion
KaidenFinn
Mar 17, 2025Iron Contributor
How to recover files deleted by windows defender on USB flash drive?
When my dad's USB flash drive was connected to my Windows 11 laptop, some of the files were deleted automatically by Windows defender. It says threats were detected and they are deleted without permission. I checked the Recycle Bin and the deleted files and folder are not there.
My dad says it is a clean USB and not having done with any suspicious activities. The deleted files are very important and I am looking for a way to recover files deleted by windows defender. If anyone knows how to do this? Pls help!
If you can't find the deleted files from Trash, then use a data recovery software to help yo retrieve the files deleted by Windows Defender. The sooner you do this, the higher chance to get back the files.
Here is a very helpful tutorial for data recovery:
https://www.pctipdaily.com/recover-files-deleted-by-windows-defender
It applies to internal drive, external drive, USB drive and SD card!
- WinUser2025Copper Contributor
When Windows Defender deletes files from a USB flash drive, they typically don't go to the Recycle Bin; instead, they're often moved to a quarantine location on your system. If the files are not found in the quarantine, they might still be recoverable through data recovery software. These tools scan your drive for any traces of deleted files and attempt to restore them.
After data recovery, you can try to adjust Windows Defender Settings to prevent future issues: In "Virus & threat protection settings," you can customize how Windows Defender deals with detected threats, such as prompting before taking action instead of automatically removing threats.
- ViggoBearIron Contributor
If you can't find the deleted files from Trash, then use a data recovery software to help yo retrieve the files deleted by Windows Defender. The sooner you do this, the higher chance to get back the files.
Here is a very helpful tutorial for data recovery:
https://www.pctipdaily.com/recover-files-deleted-by-windows-defender
It applies to internal drive, external drive, USB drive and SD card!
- YarrowSterlingIron Contributor
If you prefer to use the command line to recover files deleted by Windows Defender, here are a few command line methods:
Recover files from Windows Defender quarantine using PowerShell
If a file was quarantined by Windows Defender instead of being completely deleted, you can try to recover it using PowerShell. Open PowerShell (Run as Administrator) and use the following command to view quarantined files:sql Get-MpThreatDetection
Once you have found the file you want to recover, you can use the following command to recover the file:arduino Restore-MpThreat -ThreatID "threat_ID"
Note that you will need the threat_ID, which you can find using Get-MpThreatDetection.
Use command line data recovery tools
If the file has been deleted and is not in quarantine, you can try command line data recovery tools. For example, use the chkdsk command to check if a USB drive has any recoverable lost files:Open Command Prompt (Run as Administrator) and enter:
bash chkdsk X: /f
Where X: is the letter of your USB drive. This command will scan the drive and attempt to repair any corrupted file systems. It may not recover all your files, but it's worth a try.
Use Windows' built-in backup and restore commands
If you previously turned on file history or backups, you can restore files from the command line. You can use the wbadmin command in the command line to restore a previous backup:php-template wbadmin start recovery -version:<version number> -itemType:File -items:<file path> -backupTarget:<backup storage location>
Where <version number> is the backup version you want to restore, <file path> is the file path you want to restore, and <backup storage location> is the backup storage location.
These command line methods are suitable for different recovery situations. See which one works for you and try to recover your files that were deleted by Windows Defender!
- HolawaySteel Contributor
It can be annoying to encounter Windows Defender automatically deleting files. Here are a few possible ways to recover files deleted by Windows Defender:
Check Windows Defender Quarantine
Sometimes, Windows Defender will place detected files in quarantine instead of deleting them completely. You can open Windows Security Center, go to the "Virus & Threat Protection" section, and click "Quarantine History" to see if you can find the deleted files. If you can, you can restore them.Use data recovery software
If the files have been completely deleted and you can't find them in quarantine, you can try to use data recovery software to recover them. Tools like Rescuva or Disk Drill are easy to use and should be able to recover most deleted files as long as the files have not been overwritten.Enable File History or Backup
If you have Windows File History enabled or backed up before, you can restore the deleted files by restoring File History. You can right-click the relevant folder in File Explorer and select "Restore Previous Versions" to see if you can restore the version before the deletion.In short, recovering files deleted by Windows Defender is not complicated. Try these methods to see if they can help you recover them. I hope you can successfully recover the files you need!
- Arya66Iron Contributor
If Windows Defender deleted files from the USB flash drive, there are a few methods you can try to recover those files:
Method 1. Check Windows Defender Quarantine
Windows Defender moves potentially harmful files to quarantine rather than deleting them permanently. You can check if your files are in quarantine and restore them:- Open Windows Security by searching for it in the Start menu.
- Go to the Virus & Threat Protection section.
- Click on Protection History.
- Look for any entries related to your USB flash drive. If Windows Defender flagged and quarantined any files, you'll see them here.
- If you find the files, you can choose to restore them (if you're confident they're safe) by clicking Restore.
Method 2. Use File Recovery Software
If the files are not in quarantine or if they were permanently deleted, you can try using file recovery software.- Download and install one of these tools on your computer.
- Connect your USB drive.
- Run the software and perform a deep scan on your USB drive.
- Once the scan is complete, the software should show you a list of recoverable files. Select the files you want to recover and restore them.
Method 3. Use Command Prompt (If Files Are Hidden)
Sometimes, files might not be deleted but just hidden. You can try to unhide them using the Command Prompt:Open Command Prompt as Administrator.Type the following command and press Enter:
attrib -h -r -s /s /d X:\.
Replace X with the letter of your USB drive. This command removes hidden, read-only, and system attributes from the files and should make them visible again.
The above are three effective methods to let you recover files deleted by Windows Defender from flash drive. Let me know if you need more help on this!
- FinleyWilderIron Contributor
Windows Defender might delete files from your USB drive if it detects them as potentially harmful or infected with malware. This often happens if:
- Suspicious files: The files on the USB drive are flagged as suspicious based on their behavior or the signature of known malware.
- False positives: Sometimes, Windows Defender may flag safe files as threats, which can lead to deletion.
Viruses or malware: If there’s an active virus or malware on the USB, Defender might remove the infected files to protect your system. - Heuristic analysis: Windows Defender uses heuristic analysis to detect new or unknown threats based on file behavior. This might result in the deletion of legitimate files that resemble the behavior of malware.
To prevent Windows Defender deleting files from USB drive, you can:
- Add your USB drive to the exclusions list in Windows Defender if you're sure the files are safe.
- Check for any malware on your system with a deeper scan.
- Make sure the files on the USB are from a trusted source.
To recover files deleted by windows defender, please check if there is a backup out there. Usually, people back up the important file to an external hard drive or onedrive on Windows 11.