Fsutil: dirty
Queries to see whether a volume's dirty bit is set. Sets a volume's dirty bit. When a volume's dirty bit is set, autochk automatically checks the volume for errors the next time the computer is restarted.
Syntax
fsutil dirty {query|set} PathName
Parameters
query : Queries the dirty bit.
set : Sets a volume's dirty bit.
PathName : Specifies the drive letter (followed by a colon), mount point, or volume name.
Remarks
If a volume's dirty bit is set, this indicates that the file system may be in an inconsistent state. The dirty bit can be set because the volume is online and has outstanding changes, because changes were made to the volume and the computer shutdown before the changes were committed to disk, or because corruption was detected on the volume. If the dirty bit is set when the computer restarts, chkdsk runs to verify the consistency of the volume.
Every time Windows XP starts, Autochk.exe is called by the Kernel to scan all volumes to check if the volume dirty bit is set. If the dirty bit is set, autochk performs an immediate chkdsk /f on that volume. Chkdsk /f verifies file system integrity and attempts to fix any problems with the volume.
Examples
To query the dirty bit on drive C, type:
fsutil dirty query C:
Sample output:
Volume C: is dirty
or
Volume C: is not dirty
To set the dirty bit on drive C, type:
fsutil dirty set C: