Why Did All Files Turn into .EXE on Windows? How to Fix It?
Have all the files on your Windows computer suddenly turned into .exe files? Are your photos, documents, videos, folders, and other personal files showing an EXE extension instead of their original file formats? If so, don’t panic. This problem can be caused by a shortcut virus, malware infection, incorrect file associations, or hidden file attributes.
For example, a picture that originally appeared as family.jpg might now show up as family.jpg.exe. Similarly, a Word document might appear as report.docx.exe. In some cases, your original files are still present, but malware has hidden them and created fake executable files with similar names.
The important thing is to avoid opening suspicious EXE files. Running them could infect your computer further or put your personal information at risk.
In this guide, I’ll explain why all files turn into EXE files on Windows 11 and Windows 10 and walk you through several ways to fix the problem.
Why Have All Files Turned Into .EXE on Windows?
When your files suddenly appear with an .exe extension, it doesn’t necessarily mean Windows has converted every file into a program. In many cases, something has changed how your files are displayed or accessed.
Here are the most common reasons behind this problem.
1. Malware or Shortcut Virus: Certain types of malware hide your original files and create malicious shortcuts or executable files that look like your documents, pictures, or folders.
2. Incorrect File Associations: Windows uses file associations to determine which application should open a particular file. If these settings become corrupted, files might open with the wrong program.
3. Hidden File Extensions: Windows sometimes hides known file extensions. This can make a suspicious file look like a normal document when its actual extension is .exe.
4. Changed File Attributes: Malware can mark your original files as hidden or system files, making them disappear from their usual folders.
5. USB Drive Infection: An infected USB flash drive can spread malware to your Windows computer and create fake shortcuts or executable files.
6. Malicious Software: A recently downloaded program, email attachment, or unknown application could introduce malware that changes how your files appear.
Fix All Files Turned Into .EXE on Windows

To fix all files turned into .EXE on Windows, first disconnect infected USB drives and avoid opening suspicious executable files. Run a full Microsoft Defender antivirus scan, enable hidden files and file extensions in File Explorer, and check whether your original files are hidden. If malware has changed file attributes, use Command Prompt to restore them after confirming the correct drive and folder. Finally, repair file associations if necessary and restart Windows.
Let’s go through these solutions step by step.
Step 1: Disconnect External USB Drives
If you notice that files on your computer or USB drive have suddenly turned into EXE files, start by disconnecting external storage devices.
Remove any USB flash drives, external hard drives, or memory cards connected to your computer. This helps prevent potentially infected devices from spreading malware.
Do not open any suspicious shortcuts or executable files, even if they have familiar names.
If the problem started immediately after connecting a USB drive, there’s a chance that the drive is infected. Keep it disconnected until you’ve scanned your computer.
Step 2: Enable Hidden Files and File Name Extensions
Sometimes, malware hides your original files and creates fake executable files with similar names. Windows might also hide file extensions, making it harder to identify suspicious files.
Let’s check whether your original files are still there.
On Windows 11:
- Open File Explorer by pressing Windows + E.
- Click View from the top menu.
- Select Show.
- Enable Hidden items.
- Open the Show menu again and enable File name extensions.
On Windows 10:
- Open File Explorer.
- Click the View tab.
- Find the Show/hide section.
- Check Hidden items.
- Check File name extensions.
Now, revisit the folder where your files were affected.
Check whether your original documents, pictures, and videos are visible again. If you see files with names such as document.docx.exe, don’t open them.
Microsoft also recommends enabling file extensions to make file types easier to identify.
Step 3: Run a Full Antivirus Scan
If your files have been renamed or suspicious EXE files have appeared, scan your computer for malware.
Windows 11 and Windows 10 include Microsoft Defender Antivirus, which can detect and remove many common threats.
Follow these instructions.
- Press the Windows key and search for Windows Security.
- Open the Windows Security application.
- Select Virus & threat protection.
- Click Scan options.
- Select Full scan.
- Click Scan now.
Wait until the scan finishes. Depending on how many files are stored on your computer, this process might take some time.
If Windows Security detects malware, follow the recommended action to quarantine or remove the threat.
Important: Don’t restore suspicious files from quarantine simply because they have familiar names.
Step 4: Run Microsoft Defender Offline Scan
A regular antivirus scan might not remove malware that remains active while Windows is running. In that situation, try Microsoft Defender Offline Scan.
This scan restarts your computer and checks for threats outside the normal Windows environment.
- Open Windows Security.
- Select Virus & threat protection.
- Click Scan options.
- Select Microsoft Defender Offline scan.
- Click Scan now.
- Save your work and close all open applications.
- Confirm the restart when Windows asks for permission.
Your computer will restart and perform the offline scan. Once the process finishes, Windows will start normally.
Check the scan results under Virus & threat protection and Protection history.
Remember to save your work before starting because this scan requires a restart.
5: Restore Hidden Files Using Command Prompt
If your original files are still missing after scanning your computer, malware might have changed their file attributes.
You can use the ATTRIB command to remove the Hidden and System attributes from files and folders.
Here’s how to do it.
- Press Windows + S and search for Command Prompt.
- Right-click Command Prompt and select Run as administrator.
- Identify the drive containing your affected files. For example, your USB drive might use the letter E:.
- Enter the following command, replacing E: with your actual drive letter.
attrib -h -r -s /s /d E:\*.*
5. Press Enter and allow Windows to process the files.
The command removes the Hidden, Read-only, and System attributes from matching files and folders on the selected drive and its subfolders.
Important: Only run this command on the specific affected data drive or folder. Don’t blindly apply it to your entire Windows system drive. It does not remove malware or recover deleted files.
If your files are stored in a particular folder, you can target that folder instead.
For example:
attrib -h -r -s /s /d “E:\Documents\*.*”
This command is particularly useful when your original files have been hidden by a shortcut virus.
Step 6: Check Whether Your Files Have Actually Been Renamed
After restoring hidden files, inspect their names and extensions carefully.
For example, if you find a file named holiday.jpg.exe, it is an executable file, not an ordinary picture.
Do not simply rename every .exe file to .jpg, .docx, or .pdf. Changing an extension doesn’t convert the file into that format.
Instead, check whether another copy of the original file exists without the .exe extension.
If the original files are missing, check your OneDrive backup, Windows File History, or another backup location.
If you suspect that malware has encrypted or deleted your files, avoid making unnecessary changes to the affected drive. Consider professional data recovery assistance.
Step 7: Repair File Associations in Windows
If your files have their original extensions but Windows opens them with the wrong applications, the problem might involve incorrect file associations.
You can restore the default application settings.
- Press Windows + I to open Settings.
- Select Apps.
- Open Default apps.
- Find the file extension you want to repair, such as .jpg, .pdf, or .docx.
- Select the extension.
- Choose the correct application from the available options.
For example, select Microsoft Photos for supported image files or Microsoft Word for Word documents.
Repeat the process for other affected file types.
This step helps when Windows has incorrect opening settings. However, it won’t restore files that malware has renamed or hidden.
Step 8: Restart Windows and Check Your Files
Once you’ve completed the previous steps, restart your computer.
Open File Explorer and revisit your Documents, Pictures, Downloads, and Desktop folders.
Check whether your files have their original names and extensions.
If everything looks normal, run another antivirus scan to make sure no threats remain.
Also, update Windows and Microsoft Defender security intelligence to improve protection against newly detected threats.
FAQs
1. Why did all my files suddenly become EXE files?
This can happen because of malware, shortcut viruses, hidden file attributes, or incorrect file associations. If you notice unfamiliar executable files appearing alongside your documents, scan your computer before opening them.
2. Can I recover files that have turned into EXE files?
Yes, recovery might be possible if malware has only hidden your original files or created fake executable shortcuts. Use antivirus scanning and the ATTRIB command to check for hidden files. If the original files were deleted or encrypted, you may need a backup or professional recovery service.
3. Is the EXE file virus dangerous?
An EXE file isn’t automatically dangerous. Windows uses executable files to run programs. However, an unfamiliar EXE file pretending to be a picture, document, or folder could be malicious. Avoid opening suspicious files.
4. How do I remove the shortcut virus from a USB drive?
First, scan the USB drive with an updated antivirus program. After removing detected threats, enable hidden items in File Explorer and use the ATTRIB command to restore hidden files if necessary. Don’t format the drive until you’ve recovered or backed up important data.
5. Why are my folders showing as EXE files in Windows 11?
Your folders might have been hidden by malware, with fake executable files created using similar names. Enable hidden items and file extensions to inspect the actual files. Run an antivirus scan before attempting to open anything suspicious.
6. Will reinstalling Windows fix the EXE file problem?
A clean Windows installation can remove many forms of malware from the Windows installation, but it isn’t the first solution to try. Back up important data carefully, and scan external storage devices before reconnecting them. Also, remember that reinstalling Windows won’t automatically recover deleted or encrypted files.
