Name

Chkntfs — \windows\system32\chkntfs.exe

Synopsis

Display or change the checking of a disk (using Chkdsk) at Windows startup

To Open

Command Prompt chkntfs

Usage

chkntfs [drive | /d | /t:time | /x drive | /c drive]

Description

Chkdsk, described earlier in this chapter, is run automatically during Windows startup, either if the previous session was not ended gracefully (the computer was turned off without shutting down) or if errors are detected. Chkntfs is used to modify this behavior for one or all of your drives.

If you run Chkntfs with only a drive letter (e.g., chkntfs c:), you get a somewhat cryptic report, like this:

The type of the file system is NTFS.
C: is not dirty.

The identification of the filesystem type on the first line is fairly self-evident. The “not dirty” report implies that the drive was properly “cleaned up” the last time the system shut down. In other words, the system shut down properly. If the system isn’t shut down properly, any drives in use (drives containing one or more files that were open when the computer lost power, for example) are marked “dirty,” and those drives are scanned the next time Windows starts. To change this behavior, use one of the following options. Note that all options, including the specification of the drive letter above, are exclusive; only one can be used in any time.

/d

Type chkntfs /d to restore the default behavior of the entire machine; all drives automatically check to boot time, and any drives found to be “dirty” are checked ...

Get Windows XP in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.