Use CHKDSK for disk errors, DISM for Windows image corruption, and SFC again for system-file damage; if SFC says it could not fix files, run DISM first, then rerun SFC. Ignoring the type of corruption wastes time and can leave Windows updates, startup repair, and protected files broken. I use that order because the wrong repair step often fails cleanly while the real fault stays put. This guide shows how to identify the fault, pick the right Command Prompt repair path, and use them in the right order on Windows 8, 10, and 11. (wikihow.com)

What a corrupt-file error means in Windows

What a corrupt-file error means in Windows

A corrupt-file error usually means one of two things: Windows system files are damaged, or a personal file such as a photo, archive, document, or video is broken. Those problems do not use the same fix. Command Prompt can often repair Windows files, but it cannot reconstruct every damaged user file.

System files vs personal files

System files live inside Windows and are protected by Windows Resource Protection. When they fail, you may see SFC messages about corrupt files or files it could not fix. Personal files are different. A damaged MP4, ZIP, or DOCX may open badly, but SFC will not repair it because it is not a Windows component.

What Windows Resource Protection usually means

When Windows Resource Protection reports corrupt or missing files, it is pointing to protected system components that SFC checks against cached copies. If the cache is healthy, SFC may replace the bad file. If the cache is also damaged, SFC may stop short and leave a note in CBS.log for the next repair step.

When Command Prompt can help, and when it cannot

Command Prompt helps most with Windows system corruption, startup issues, and broken protected files. It is much less useful for a user file that was overwritten, truncated, or badly encoded. If the damage is to a personal file, recovery tools or backups are usually the next stop, not SFC.

According to How to Open the Command Prompt in Windows 8, 10, and 11 - wikiHow — On Windows 10, the Power User menu can show Command Prompt. (source)

Which repair path should you try first?

Start with SFC for protected Windows files, move to DISM if SFC cannot finish the job, and use offline repair when Windows will not boot normally. That order avoids repeating the same failed step.

Error message or symptom Likely repairable scope Next step
Windows Resource Protection found corrupt files Protected system files, often repairable in place Run SFC /scannow again to verify
Windows Resource Protection found corrupt files but was unable to fix some of them System files plus a damaged Windows image or bad cache Run DISM first, then rerun SFC
Windows will not boot normally System files, boot files, or the image itself Use recovery options and run offline repair
Command Prompt will not open Potentially broader system damage Boot into recovery and try offline repair; back up data first if possible
File opens as gibberish or will not play Personal file corruption Use file-specific recovery; SFC will not fix it

How do you open an elevated Command Prompt?

You generally need an elevated Command Prompt because many system repair commands require administrator rights. Open it from Search, or press Win + R, type cmd, then reopen it with admin rights from Search or Start. If the title bar never says Administrator, the command may run with too little access and fail.

  1. Press the Windows key and type cmd.
  2. Right-click Command Prompt.
  3. Select Run as administrator.
  4. Approve the User Account Control prompt.

Open it with Win + R and cmd

  1. Press Win + R.
  2. Type cmd and press Enter.
  3. If the window opens normally, close it and reopen with Run as administrator from Search or Start.

Confirm administrator rights before repairs

  1. Look at the title bar for Administrator: Command Prompt.
  2. If that label is missing, close the window.
  3. Reopen it using Run as administrator.

Run SFC first

Run SFC first
Run SFC first

SFC /scannow is often the first command to try for protected Windows files. From an elevated Command Prompt, it checks for corrupted or missing system files and tries to replace them with cached copies. If the cache is damaged too, SFC may report that it found problems but could not fix every file.

What sfc /scannow checks

The command scans protected Windows files and compares them with known-good copies in the local cache. That is why it is the right first move when Windows features, updates, or startup components look damaged. It is a system-file repair command, not a general file recovery tool.

What the scan tries to repair

SFC attempts to replace missing or corrupted protected files with cached versions. If the local store is intact, the repair can finish without more work. If the store is also corrupt, SFC may return the familiar message that it found bad files but could not fix some of them.

How long the scan may take

The scan often runs for several minutes, and larger systems or damaged disks can push it longer. Leave the window open until it finishes. If the drive is still busy, let it keep working instead of stopping it halfway through.

What the result messages mean

If SFC says no integrity violations were found, the protected files it checked are likely fine. If it found corrupt files and repaired them, rerun it once to confirm. If it could not fix some of them, move to DISM.

  1. Open Command Prompt with Run as administrator.
  2. Type sfc /scannow and press Enter.
  3. Wait for the scan to complete.
  4. Read the result message before choosing the next step.

What should you do if SFC cannot fix the files?

If SFC cannot fix some files, the next step is usually DISM rather than repeating the same scan. DISM repairs the Windows image that SFC depends on. After DISM completes, run SFC again so it can use the repaired component store to replace missing or damaged files.

Check CBS.log for the failed files

SFC may create or update CBS.log during the scan. That log records corrupt or missing file details, and it can help confirm which protected files remain damaged after SFC finishes.

Run DISM to repair the Windows image

  1. Open Command Prompt as administrator.
  2. Run: DISM /Online /Cleanup-Image /RestoreHealth.
  3. Wait for it to finish before launching SFC again.

Run SFC again after DISM

  1. Open the same elevated Command Prompt.
  2. Run sfc /scannow again.
  3. If the message clears, stop there.
  4. If problems remain, use offline repair.

When does SFCFix help?

If SFC still reports damaged protected files after DISM, the usual next step is to repair Windows offline or from recovery mode. Use the files and messages in CBS.log to confirm whether the issue is still in protected Windows components.

What SFCFix does with CBS.log

SFCFix is not needed for the standard Windows repair path. If CBS.log still lists files that SFC could not repair, use the log to identify the remaining problem and continue with DISM or offline repair instead of a third-party tool.

Why it is useful after SFC misses some files

SFC is broad. When the failure list is specific and CBS.log points to a small set of protected files, the more standard next step is to repeat SFC after DISM or to use offline repair against the Windows installation.

  1. Run sfc /scannow first.
  2. Open CBS.log if SFC reports unrepaired files.
  3. Run DISM /Online /Cleanup-Image /RestoreHealth from an elevated Command Prompt.
  4. Run sfc /scannow again to verify the repair.
  5. If problems remain, switch to offline repair.

Need offline repair or boot recovery?

If Windows will not start normally, repair from within the desktop may not be possible. Use recovery options and run the repair commands offline from that environment. If the machine is unstable enough that you cannot trust the disk or the system image, protect the data first and postpone more repair attempts.

When Windows will not start normally

Booting issues usually mean the system is too damaged for a normal desktop repair session. In that case, use Windows recovery options to reach Command Prompt outside the running installation. That lets you work on the offline Windows folder instead of the live one.

How offline repair changes the process

Offline repair changes the target. You are no longer fixing the active Windows session, so the commands need the recovery environment’s path layout. For a standard offline SFC run, use:

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

If the Windows drive letter in recovery is different, replace C: with the correct offline Windows volume letter. If image repair is needed offline, use DISM with the mounted Windows image path, such as:

dism /Image:C:\ /Cleanup-Image /RestoreHealth

Adjust the target path to the offline Windows installation before running the command.

When data backup comes before any more repair tries

If the drive is making strange noises, dropping offline, or throwing read errors, back up personal files first. After that, decide whether repair is still worth doing. A machine that cannot keep a stable file system may be beyond a Command Prompt fix and may need reinstall or service work.

What if that did not work?

If SFC and DISM do not clear the error, the next escalation is offline repair, then backup and reinstall if the system remains unstable. At that point, more command-line retries usually waste time. Preserve the files you care about and treat the installation as suspect.

  1. Boot into Windows Recovery Environment.
  2. Open Command Prompt from the recovery tools.
  3. Run offline repair commands against the Windows installation.
  4. Back up personal files if the system still fails.
  5. Reinstall Windows if protected files keep breaking.

Prevention

After a successful repair, rerun sfc /scannow once and keep a current backup of personal files. That gives you a fast way to confirm the repair held and a clean exit if the same corruption returns later.

Frequently asked questions

how to fix corrupt files windows 10 command prompt

Open Command Prompt as administrator, run sfc /scannow, and check the result. If it reports files it could not fix, run DISM next, then run SFC again. On Windows 10, the Power User menu can also show Command Prompt, but admin rights still matter for repair.

how do i fix corrupt files with command prompt

Use sfc /scannow first for protected Windows files. If SFC reports that it could not fix some files, run DISM to repair the Windows image, then repeat SFC. If the PC will not boot, use recovery mode and run offline repair.

can command prompt repair corrupted windows files

Yes, for protected Windows files. Command Prompt can launch SFC, which checks for corrupted or missing system files and tries to replace them with cached copies. It cannot repair every damaged personal file, and it will not fix a disk with physical errors on its own.

what do i do if sfc says it found corrupt files but couldn't fix them

Run DISM first, then rerun sfc /scannow. If the failure list is still present, use the offline repair steps to work against the installed Windows image. If the PC will not boot, move the process to recovery mode and repair offline.

should i use sfc /scannow or DISM first

Use SFC first when the problem looks like protected file damage. If SFC says it could not fix some files, run DISM next because the Windows image may be damaged. After DISM finishes, run SFC again so it can use the repaired component store.

how long does a command prompt file repair take

SFC can take a while, and DISM can also take several minutes or longer. Slower disks and stacked repairs stretch the wait. Let each command finish before launching the next one, because stopping early can hide the real result and waste the repair pass.