Windows 10 and Windows 11 Are Deleting Files: What to Do?

If your Windows 10 or Windows 11 system has started deleting files unexpectedly, it can be concerning. However, there are several possible reasons for this issue, and solutions to help you recover your data and prevent it from happening again. In this guide, we’ll cover what steps you can take if your operating system automatically deletes files from your computer.

1. Check Storage Sense Settings

Both Windows 10 and Windows 11 come with a feature called Storage Sense that automatically deletes temporary files and items from the Recycle Bin to free up disk space. While this feature can be useful, it may inadvertently delete important files.

  • Go to Settings → System → Storage.
  • If Storage Sense is enabled, turn it off to stop automatic file deletion.

2. Disable Antivirus or Add Files to Exclusions

Sometimes, Windows Defender or third-party antivirus software may mistakenly flag your files as threats and remove them. To avoid this, you can temporarily disable your antivirus or add specific files and folders to the exclusions list.

  • Open Windows Security.
  • Go to Virus & threat protectionManage settings.
  • Add the necessary files or folders to the exclusions list.

3. Review OneDrive and Other Cloud Sync Settings

Windows often integrates with OneDrive, and if synchronization is not set up correctly, your files may be removed from local storage once they are uploaded to the cloud.

  • Right-click the OneDrive icon in the taskbar and select Settings.
  • Go to the Files on Demand section and disable Files On-Demand.
  • Ensure important folders are not set to be synced only in the cloud.

4. Check Startup Programs

Some programs that start with Windows may delete or move files as part of their operation. For instance, disk cleanup utilities like CCleaner may automatically remove temporary files.

  • Press Ctrl + Shift + Esc to open the Task Manager.
  • Go to the Startup tab and disable unnecessary programs.

5. Use System Restore

If files were deleted due to a system error, you can use the System Restore feature to revert your PC to a previous state before the issue occurred.

  • Open the Control Panel and go to Recovery.
  • Select Open System Restore and follow the wizard to restore your system.

6. Run a Disk Check for Errors

File loss can also result from disk errors or corrupted sectors. To check your disk for issues, use the CHKDSK utility.

chkdsk /f /r

Run this command as an administrator to scan the disk and fix any problems found.