How To Fix Corrupted Files
Fix corrupted files immediately as they can cause a system crash.
How do corrupt files happen and what are they and how can fix corrupted files?
A system file is crucial to the operation of the
operating system, and it can be referred to be corrupt when it is damaged and
unable to carry out its intended function.
Corrupt files can occur in all programs, but these files can be quite challenging when they occur in the operating system.
Your Windows files or system files can get corrupted due to various reasons, below are the most common reasons.
Power outages:-
These can occur haphazardly and without any warning, and they can seriously damage your hard drive.
System crashes:-
System crashes can result from hardware or software issues, and they can also cause system files to become corrupt.
Update Errors:-
Update errors occur frequently and can also cause BSOD errors which can lead to system file corruption.
Malware and Viruses:–
Although not as often as you
might think, viruses and malware can corrupt system files. This event is
unusual because crashing your system does not achieve the main goal of a virus
or malware, the retrieval of important data.
Hardware problems:–
Bad sectors and corrupted files can start
appearing when the hard drive starts experiencing problems reading and writing
data.
How to fix corrupted files windows 10
Use the SFC tool to fix corrupted files
Start the System File Checker.
Click on the search bar at the bottom left.
Type in "Command Prompt".
Click on Command Prompt "Run as administrator".
Click Yes if the Windows 10 User Account Control prompt is displayed.
Enter the following command and click Enter once Command Prompt has opened
sfc /scannow
Don't quit Command Prompt or stop the fix from happening. Be patient as you wait for it to finish as it may take some time.
SFC
will detect the issues and fix missing or damaged system files in Windows 10
when you perform the scan. Additionally, it can quickly fix problems when
Windows 10's C disk is faulty.
If
your system files are not corrupted, you should see the statement Windows
Resource Protection did not identify any integrity violations after the repair
operation is complete.
However,
keep in mind that the System File Checker utility can't always restore
corrupted files.
Check the SFC log
Use the Windows Search Bar to type cmd, and then select Run as Administrator to launch Command Prompt with full access
You'll generate a sfclogs.txt file on your
Desktop by entering the following command and pressing Enter:
findstr /c:"[SR]"
%windir%\logs\cbs\cbs.log >sfcdetails.txt
Open
the sfcdetails.txt and check the results of the SFC scan.
Remember
that the information in this log file is limited to details on the Windows SFC
scan. You may easily perform a CMD scan and repair using the two ways mentioned
above.
Use the DISM tool to repair corrupted files
Press the Windows key + X and click on Windows PowerShell (Admin) to open the app with administrative privileges.
Type or paste the following command and press Enter:
DISM /Online /Cleanup-Image /RestoreHealth
Be patient and don't pause the repair procedure; it can take ten minutes or longer.
Restart your computer after the DISM utility has fixed your files.
Deployment Image Servicing & Management, or DISM, is used to resolve any corruption issues that can hinder the SFC tool's ideal operation. Additionally, if the Windows 11 installation file is damaged, this program will be helpful.
Run an SFC scan from Safe Mode to fix corrupted files.
Click the Windows icon in the bottom-left corner.
Holding down the Shift key, click the Power icon, and then Restart.
Your computer will restart,
You'll have a choice between three things.
Choosing Troubleshoot.
Select Advanced options.
Next, click Startup Settings.
Click the Restart button.
Upon restarting your computer, a menu will appear. By pressing the appropriate key, choose any Safe Mode option.
Repeat the instructions from Solution 1 to run an SFC scan after Safe Mode has launched
Before Windows 10 launches, run the SFC scan.
Press the Power button to turn on the system, and as soon as the Windows logo appears, hold it to turn off the computer.
When you go through the identical procedure three times, Windows will automatically run a Startup repair on your fourth attempt.
Once the process is complete, click on Advanced options.
Select Troubleshoot from the list of available choices when it displays.
Choose Advanced options and select Command Prompt.
Be sure to provide your login and password if prompted when your computer restarts.
Find the letter of your Windows 10 drive. To do that, enter the following command and press Enter
wmic logicaldisk get deviceid, volumename, description
Keep an eye on the Volume Name. Windows Volume Name will typically begin with the letter D. There is no need to be concerned about this if Command Prompt is launched before Windows.
Also, check the System Reserved drive. In most cases, it should be C.
Enter the following command and press Enter (Be sure to use the letters that you got from the previous steps)
sfc /scannow /offbootdir=C:\ /offwindir=D:\Windows
As your system files are scanned, please wait.
Close Command Prompt after the scan is finished, then launch Windows 10 normally.
If Windows 10 is being used normally, you can't always scan and repair protected system files.
To scan protected system files you’ll have to run an SFC scan before Windows 10 starts as shown above in this solution.
Replace the files manually to fix corrupted files
Press
the Windows key + X combination and select Windows PowerShell (Admin)
Paste or type the following command and press
Enter:
takeown /f C:\corrupted-file-location-and-file-name
Remember
to replace corrupted-file-location-and-file-name with the actual location of
the corrupted file. You need to include both the file name and extension and
not just the location of the directory (By running the takedown command you’ll
have ownership over the corrupted file).
Include
the following command to gain full administrator privileges over the file and
press Enter:
icacls C:\corrupted-file-location-and-file-name /Gran Administrators:F
Replace the true location of the file with the corrupted file location and name once more.
The
troubled file must now be swapped out for the healthy file that you copied from
a different PC.
Paste
the following command and press Enter:
copy C:\location-of-healthy-file C:\corrupted-file-location-and-file-name
Enter Yes if you’re asked whether you want to overwrite the file.
Repeat
these steps for all corrupted files.
After
all corrupted files are replaced, run the following command to verify if the
problem with corrupted files is fixed:
SFC /verifyonly
Use the System Restore Feature to repair corrupted files
Press
Windows Key + S, type create a restore point and select the option
from the results.
Click
on the System Restore button.
The
most recent restore point will be suggested, but you may click Choose a
different restore point and then press the Next button to choose one that
was already made.
Select the desired restore point and click Next.
System
files should be restored to their previous, healthy state after the process is
finished.
No comments