Software & Apps > Windows 200 200 people found this article helpful Sfc Command (System File Checker) Sfc command examples, switches, options, and more By Tim Fisher Tim Fisher Senior Vice President & Group General Manager, Tech & Sustainability Emporia State University Tim Fisher has more than 30 years' of professional technology experience. He's been writing about tech for more than two decades and serves as the SVP and General Manager of Lifewire. lifewire's editorial guidelines Updated on April 5, 2023 In This Article Expand Jump to a Section Availability Syntax Examples Related Commands & More Information Trending Videos Close this video player The sfc command is a Command Prompt command that can be used to verify and replace important Windows system files. Many troubleshooting steps advise the use of the sfc command. System File Checker is a very useful tool to use when you suspect issues with protected Windows files, like many DLL files. Sfc Command Availability The sfc command is available from within the Command Prompt in most Windows operating systems, including Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, and Windows 2000. System File Checker has been part of Windows Resource Protection since Windows Vista, and is sometimes referred to as Windows Resource Checker in those operating systems. In Windows XP and Windows 2000, this tool is part of Windows File Protection. This command can only be run from the Command Prompt when opened as an administrator. See How to Open an Elevated Command Prompt for information on doing that. Sfc Command Syntax Its basic form, this is the syntax required to execute System File Checker options: sfc options [=full file path] Or, more specifically, this is what it looks like with options: sfc [/scannow] [/verifyonly] [/scanfile=file] [/verifyfile=file] [/offbootdir=boot] [/offwindir=win] [/?] How to Read Command Syntax The availability of sfc command switches may differ somewhat from operating system to operating system. Sfc Command Options Item Description /scannow This option instructs sfc to scan all protected operating system files and repair as necessary. /verifyonly This sfc command option is the same as /scannow but without repairing. /scanfile=file This sfc option is the same as /scannow but the scan and repair is only for the specified file. /offbootdir=boot Used with /offwindir, this sfc option is used to define the boot directory (boot) when using sfc from outside of Windows. /offwindir=win This sfc option is used with /offbootdir to define the Windows directory (win) when using sfc offline. /? Use the help switch with the sfc command to show detailed help about the command's several options. You can save the output of the sfc command to a file using a redirection operator. See How to Redirect Command Output to a File for instructions—Command Prompt Tricks has more tips like this. Sfc Command Examples Here are some examples of the different ways you can use this command: Scan and Replace All Corrupt Files sfc /scannow Here, the System File Checker utility is used to scan and then automatically replace any corrupt or missing system files. The /scannow option is the most commonly used switch for the sfc command. Use SFC /Scannow to Repair Windows System Files Repair a Specific File sfc /scanfile=c:\windows\system32\ieframe.dll This sfc command is used to scan ieframe.dll and then repair it if an issue is found. Scan a Different Windows Installation sfc /scannow /offbootdir=c:\ /offwindir=c:\windows In the next example, protected Windows files are scanned and repaired if necessary (/scannow), but this is done so with a different installation of Windows (/offwindir=c:\windows) on a different drive (/offbootdir=c:\). The above example is how you would use the sfc command from the Command Prompt in System Recovery Options or from a different installation of Windows on the same computer. Scan Everything, But Don't Repair sfc /verifyonly With the /verifyonly option, System File Checker will scan all protected files and report any issues, but no changes are made. Depending on how your computer was set up, you may need access to your original Windows installation disc or flash drive to allow file repairs. Sfc Related Commands & More Information The sfc command is often used with other Command Prompt commands, such as the shutdown command so that you can restart your computer after running System File Checker. If Windows needs a copy of a file to replace the corrupt one with, it'll get it from C:\Windows\WinSxS\Backup\. If that source has been compromised, Windows will access the internet to download the correct files from Microsoft's website. See Microsoft's piece on System File Checker for more information you may find useful. Was this page helpful? Thanks for letting us know! Get the Latest Tech News Delivered Every Day Subscribe Tell us why! Other Not enough details Hard to understand Submit Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up Newsletter Sign Up By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookies Settings Accept All Cookies