Windows

Files are Getting Deleted After Restarting Computer: 4 Fixes

9 min read

Reading Time: 9 minutesA simple reboot can fix numerous common issues on your computer. Whether it’s installing a new program or updating Windows, rebooting is essential for your PC. But, what if you restarted the PC and everything is gone? Maybe you had some important photos that are no longer there after a reboot. While there are several reasons why data loss may occur after a reboot, the good news is that your files can be recovered. Use our guide to find out how.

Does Restarting My Computer Delete Everything

No, the process of restarting doesn’t delete anything. There are other underlying reasons for data deletion such as–a malware infection, using a temporary user profile, and a corrupt or failing hard drive. If you forget to save projects you’re working on, and simply reboot your PC, the project files will likely disappear too.

Luckily, the reason your computer seemingly deleted everything after a restart, can be easily determined. The next section explores the common reasons for file deletion after restarting and their symptoms.

Why Did My Computer Restart and Delete My Files?

If your computer restarted and deleted your files, it was caused by one of the reasons explained in this section. Most of these problems can be resolved in little to no time, and don’t require a lot of technical knowledge.

Storage Sense in Windows

For better storage space management, Windows 10 and 11 come with a feature called Storage Sense. It automatically cleans up temporary internet/application files and files from the Recycle Bin. Depending on its configuration, it may delete files from the Downloads folder as well.

If you notice that your computer deleted everything from the Downloads folder or the Recycle Bin, you can turn off Storage Sense:

  1. Search for “storage sense” in Windows Search (Windows Key + S) and click on Turn on Storage Sense from the search results.Storage Sense in Windows Search.
  2. Scroll down and switch the Storage Sense slider to Off.Windows Storage Sense On/Off slider.

Microsoft Defender is Deleting Files

Microsoft Defender can falsely flag safe files as malware, and quarantine or delete them. If you notice that Windows 10/11 keeps deleting specific programs and documents after a restart, consider adding an exception for them in Windows Defender.

Here is how you can stop Windows Defender from deleting your files:

  1. Click on Start > Settings.Settings in Windows Search.
  2. Click on Privacy & security and then choose Windows Security.Windows Security option in Settings.
  3. Now, click on Virus & threat protection.Virus & threat protection option in Windows Defender.
  4. Under Virus & threat protection settings, choose Manage settings.Manage settings option under Threat Protection in Windows Defender.
  5. Scroll down to Exclusions and then click on Add or remove exclusions.Add or remove exclusion option in Windows Defender.
  6. Finally, click on Add an exclusion, then choose the file, folder, file type, or process you want to exclude from Windows Defender.The Add an exclusion option in Windows Defender.

Temporary User Profiles

When Windows is unable to log you in with a regular user profile, it creates a provisional one for you. Files created during a temporary user profile session are, well, temporary. As soon as you log out of the profile or restart your computer, all files created using the temporary profile will be deleted.

If everything on your PC disappeared after a restart, a temporary user profile is the culprit in most cases. Here are a few ways to fix the temporary profile issue on your computer.

Malware Infection

If you notice files are being deleted from a particular partition, your computer is likely infected with malware. A PC that is restarting randomly, and performing slower than usual likely has a virus or other malware present in it.

To secure your PC and remove malware from your PC, scan it using Windows Defender:

  1. Type “security” in Windows Search (Windows Key + S), and click on Windows Security from the search results.
  2. Click Virus & threat protection on the Windows Security dashboard.Virus & threat protection button in the Windows Defender dashboard.
  3. Under Current Threats, click on Scan options.The Scan options option in Windows Defender.
  4. Select Full Scan and then click Scan now to begin the scan.The Full scan option in Windows Defender, along with the Scan now button.

How to Recover Files Lost After Restarting Your Computer

To maximize your chances of data recovery, act quickly and use your PC only when you begin the data recovery process. Here are some ways to recover your files after they disappeared from your PC:

Method 1: Check If You’re Logged In With a Temporary User Profile

When logged in with a temporary user profile, your files and settings are automatically deleted as soon as you log out. Additionally, the files from your user folders (Documents, Desktop, Pictures, etc.) will be inaccessible when using a temporary profile.

If you observe Windows 10/11 keeps deleting your programs and documents after a restart, you are likely logged in using a temporary user profile.

To switch back to your regular user profile, press CTRL + ALT + Delete and then choose the Switch user option.

If you’re unable to log in with your regular profile, we also recommend you perform an SFC scan:

  1. Search for cmd in Windows Search (Windows Key + S), and right-click Command Prompt > Run as administrator.
  2. In the console, type SFC /scannow and press Enter.SFC command syntax in the Windows Command Prompt.
  3. Let Windows verify your files. It may take some time.

After performing the SFC scan, try logging in again. If you’re still unable to do so, use this guide to recover your user profile.

Important: Copy all files from the C:\Users\YourUsername folder to an external storage drive to prevent them from being lost when fixing the temporary profile issue.

If you require further help, Microsoft Answers also has helpful guides on fixing the temporary profile issue, and what to do when you’re unable to create a new user profile.

Method 2: Use Data Recovery Software

After fixing whatever was causing your PC to delete files after a restart, how do you get back the files that were deleted? This is where data recovery software comes in. There are plenty of options to choose from, but we’ll be using Disk Drill in our guide.

We selected Disk Drill because it has a proven track record of helping users recover their data from a variety of data recovery scenarios. Thanks to its simplistic, modern UI, the entire data recovery process takes only a few clicks. It recognizes over 400+ file formats and supports all major file systems, so you don’t have to worry about compatibility.

Here’s how you can Disk Drill to recover your files from a computer that restarted and deleted everything:

  1. Download Disk Drill, and install it.
  2. Open Disk Drill, select the drive you want to scan and click Search for lost data. In our case, we’ll recover user data such as desktop files that are missing after a restart, Documents, Pictures, Music, etc.Disk Drill home screen.
  3. Click on Review found items to view the files Disk Drill discovered. Alternatively, you can directly click on the file type you want to recover (Pictures, Videos, Audio, Documents, Archives, and Other) to filter out the results.Scan complete screen in Disk Drill.
  4. Use the checkbox next to each file to select it. Disk Drill displays a preview of the selected file. After confirming the files you wish to recover, click on the Recover button. Windows users can recover up to 500 MB of data as part of Disk Drill’s free trial. Further recovery requires a license.List of recoverable files in Disk Drill.
  5. Select a recovery destination for your files, and click Next. It’s recommended you recover the files to another drive or partition.Recovery destination prompt in Disk Drill.
  6. Disk Drill will recover the files for you.Data recovery is complete screen.

Bonus: To know more about Disk Drill and all its features, skim through our in-depth review of the tool. It’ll help you make a more informed decision as it also contains a comparison of the tool with other programs in the market.

Method 3: Windows File Recovery Tool

Windows File Recovery is a data recovery tool developed by Microsoft itself. Being a command-line tool, it is not as user-friendly as GUI-based data recovery programs. But, it is still quite effective at recovering lost data from your drives.

Here is how to recover data using the Windows File Recovery tool:

  1. Download the Windows File Recovery tool.
  2. Run the application.
  3. In the console, type winfr X: Y:\RecoveryFolder /regular and press Enter. Here, replace “X” with the drive you want to scan, and “Y” with the destination you would like to save the recovered files on. In our case, we’re scanning the D: partition and saving the files to a folder called Recovery on the E: partition. Use the screenshot in the next step for reference.
  4. Press Y to begin the scan.The winfr command's syntax in the Windows File Recovery tool console.

The winfr command in the Windows File Recovery tool has various other parameters you can use to filter out results, perform extensive data recovery scans, and more. A complete list of these modifiers is available on the Microsoft Support website.

Method 4: Windows File History

Windows File History is an excellent tool to create regular backups and restore previous versions of your files. If enabled, it saves a copy of your files at regular intervals and lets you restore them whenever you want.

User folders are selected by default, but other destinations should’ve been manually added during configuration. As an example, if, after a restart, your desktop files went missing, Windows File History is a good choice to get them back.

Here’s how to use Windows File History to restore your files:

  1. Connect the external storage device that you used to set up Windows File History.
  2. Type “file history” in Windows Search (Windows Key + S). Click on Restore your files with File History from the search results.Windows File History in Windows Search.
  3. Use the navigation buttons at the bottom to scroll between different backups. Press the green recover button to recover the selected files back to their original destination.The Windows File History screen.

What to Do If Your Computer Automatically Restarts Itself

There are several reasons why your computer could be automatically restarting itself. While some of them can be fixed easily, others may require you to swap out hardware.

On Windows, the automatic restart issue is typically caused by one or more of the following reasons:

  • Windows Update Reboot Loop: Faulty updates in Windows are known to cause an infinite reboot loop. Sometimes, an interrupted update process can also result in this problem. Fixing the infinite reboot issue in Windows involves performing a hard reboot, dual booting, accessing Safe Mode in Windows, or using installation media.
  • Malfunctioning Hardware: A failing RAM and other hardware issues are commonly known to result in computers automatically rebooting. It’s advisable to use programs like HW Monitor to check the temperature of your PC because overheating also causes reboot loops.
  • Malware: Computer viruses can damage system files, resulting in reboot loops and other issues on your computer. Perform a full system scan using Windows Defender or any other antivirus program to find and remove malware from your system.
  • Outdated Drivers: It’s best to keep Windows and system drivers updated. If Windows didn’t update them automatically, you can use Device Manager to update your drivers manually. It’s also possible that a new driver update was faulty, causing the reboot loop. Here, you’ll need to uninstall or roll back the driver to resolve the issue.

Conclusion

A PC that doesn’t save information after a restart has underlying technical problems leading to data loss. Unless you address them, data loss will keep recurring. If you’re unable to resolve the issue, you can have an expert take a look at your computer, but be sure to save your data using a data recovery program first.

FAQ