How to fix Windows 11 all files and folders turned into .exe files


Are all your photos, documents, videos, and folders suddenly showing up as .exe files in Windows 11? This could indicate a malware infection, especially a shortcut virus that hides your original files and creates fake executable copies. The good news is that you may be able to recover your files without reinstalling Windows.

Why have all your files turned into EXE files?

A malware infection is one of the most likely explanations when multiple file types suddenly appear as executable files. Some threats hide original files by changing their attributes and create .exe files using familiar names and icons.

This can make a photo, document, or folder look legitimate when it is actually a malicious program. Running those files could further compromise your PC.

Before attempting repairs, disconnect your PC from the internet and remove external USB drives. Do not open suspicious exe files or delete your original data.

Here’s what to do when all files and folders turn into .exe files in Windows 11

1. Show hidden files and restore their attributes

The malware may have hidden your original files rather than permanently deleting them. You can try restoring their visibility using Command Prompt.

  • Press Windows + S, search for Command Prompt.
  • Select Run as administrator.
  • Identify the drive containing your affected files.
  • Enter the following command, replacing F: with your actual drive letter.
attrib -h -r -s /s /d F:\*.*

Example: Use F: only if your affected drive actually appears as F: in File Explorer.

This command removes the hidden, read-only, and system attributes from files and folders. It does not remove malware or restore files that have been overwritten.

Once the command finishes, check your folders again. If your original documents reappear, copy important files to a separate, clean backup location. Do not run suspicious executables.

2. Run a full Microsoft Defender scan

Next, scan your PC to detect and remove the infection.

  • Open Settings and select Privacy & security.
  • Click Windows Security.
  • Open Virus & threat protection.
  • Select Scan options.
  • Choose Full scan and click Scan now.

Allow the scan to finish and quarantine any detected threats. Also check Protection history to review what Windows Security detected.

3. Use Microsoft Defender Offline scan

A persistent infection may remain active while Windows is running. Microsoft Defender Offline can scan your PC outside the normal Windows environment.

  • Open Windows Security.
  • Select Virus & threat protection.
  • Click Scan options.
  • Choose Microsoft Defender Antivirus (offline scan).
  • Select Scan now and save your work.

Windows will restart and perform the scan. Your PC should restart again after completion. Check Protection history for the results. If BitLocker is enabled, keep your recovery key available before restarting.

4. Reset broken EXE file associations

If your files retain their original extensions but Windows opens them incorrectly, their default application associations may be damaged.

  • Press Windows + I to open Settings.
  • Select Apps > Default apps.
  • Scroll down and select Reset all default apps.
  • Confirm the reset.

This restores default application settings. It will not recover files that malware has replaced with executable copies.

5. Repair corrupted Windows system files

If Windows continues behaving unusually after malware removal, run System File Checker and DISM.

Open Command Prompt as administrator and execute the following commands separately.

DISM /Online /Cleanup-Image /RestoreHealth

After it finishes, run:

sfc /scannow

Restart your computer after both scans finish. These tools repair Windows system components, not personal files or malware infections.

6. Use System Restore or reset Windows

If the problem started recently, System Restore may help return Windows to an earlier working state.

Search for Create a restore point, open System Protection, and select System Restore. Choose a restore point created before the problem appeared.

If the infection persists, consider resetting Windows as a last resort. Back up recovered personal files first, and avoid restoring suspicious executables.

Summing Up

We hope the aforementioned methods were handy to help fix the issue. In case Windows Defender detects a threat but fails to remove it, see our guide on fixing Windows Defender when it cannot remove Trojan threats. You can also use the Windows Malicious Software Removal Tool to scan for known malware infections.

If the infection has damaged Windows components, our guide on repairing corrupted system files in Windows 11 can help. And if your PC continues showing security warnings, check out these fixes for the PC status at risk warning.

Frequently asked questions

1. Can I recover files changed into EXE files?

      Possibly. If the malware only hid your original files, restoring their attributes may make them visible again. Overwritten files may require backups.

      2. Should I delete every EXE file?

      No. Windows and installed applications need legitimate EXE files. Delete nothing until you identify suspicious files and scan the system.

      3. Can Windows Defender remove this virus?

      Microsoft Defender can detect and remove many malware threats. An Offline scan can help with infections that remain active during normal Windows operation.

      4. Will resetting Windows fix the problem?

      It can remove persistent infections, but it may also erase personal data. Back up clean files before proceeding.

      5. What if my USB drive has the same problem?

      Disconnect it, scan it separately, and avoid opening suspicious shortcuts or executables. Restore hidden files only after scanning.

      More about the topics: exe file, Windows 11

      Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

      Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

      User forum

      0 messages