batch-filefsutil

chkdsk multiple drives on startup


I wish to schedule multiple chkdsk on startup:

"fsutil dirty set [drive]:" marks the drive as dirty and should be scanned but for some reason it scans C and skips D.

Is there any way to force the scan?


Solution

  • as it happens, yes there is.

    "chkntfs /c [drive]:" ovverides startup behavior to make sure the drive is scanned on startup if the dirty bit is set.

    so the final code will be something like:

    fsutil dirty set c: 
    fsutil dirty set d: 
    chkntfs /c c: d: