The command sfc /scannow is a useful Windows command that runs a system file check to make sure essential files are not damaged or missing.
This can be mighty useful in many situations, for instance when Windows features don't work anymore, after an unexpected shutdown of the system, or after a virus attack.
The default command runs the file verification check on the active partition. What if you want to run a check on an external drive?
I ran into an issue today for instance where my main PC would not boot anymore. Windows ran an endless "trying to repair" loop but would not budge at all. I made the decision to connect the drive that Windows was installed on to another computer system, to run checks on it. One of those checks was the system file check using sfc.exe.
You may run the sfc /scannow command on external drives, or internal drives with another Windows installation.
The process is nearly identical:
If you are interested in all switches that SFC supports, type SFC /?
The following command needs to be used to run the system file scan on another directory that is not the active system directory:
sfc /scannow /offwindir=d:\windows /offbootdir=d:\
Note that you need to replace d:\windows with the correct directory. If the Windows installation is on t:\win, replace the instance of d:\windows in the example above with those.
The Windows tool runs a file system verification scan on the selected Windows directory, and tries to repair any issues that it finds.
Note that I'm not entirely sure how this works if the host system runs a different version of Windows than the system that is checked.
You can run the other sfc commands as well on other Windows directories:
SFC may return the following messages:
The file verification check can be useful, but it is not a 100% method of correcting Windows issues. I had to restore an earlier backup for instance, as the sfc command would not find anything wrong with the system files.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.