Windows 7 / Getting Started

ChkDsk Syntax

The command-line syntax for ChkDsk is
Chkdsk [volume[[path] filename]] [/f] [/v] [/r] [/x] [/i] [/c] [/b] [/l[:size]]

Table-4 lists all ChkDsk command-line parameters. Unless otherwise noted, parameters apply to any file system type.

Table-4 ChkDsk Parameters

ParameterDescription
volumeSpecifies the volume that you want ChkDsk to check. You can specify the volume by using any of the formats in the following examples:
To run ChkDsk on the C volume, specify
c:
To run ChkDsk on a mounted volume called data that is mounted on the C volume, specify
c:\data
To run ChkDsk on a volume, you can specify the symbolic link name for a volume, such as
\\?\Volume{109d05a2-6914-11d7-a037-806e6f6e6963}\
You can determine a symbolic link name for a volume by using the mountvol command.
pathFAT/FAT32 only. Specifies the location of a file or set of files within the folder structure of the volume.
filenameFAT/FAT32 only. Specifies the file or set of files to check for <a ID="wPopUp" HREF="HELP=glossary.hlp TOPIC=gls_fragmentation"> fragmentation </a>. Wildcard characters (* and ?) are allowed.
/fFixes errors on the disk. The volume must be locked. If ChkDsk cannot lock the volume, ChkDsk offers to check it the next time the computer restarts.
/vOn FAT/FAT32: Displays the full path and name of every file on the disk. On NTFS: Displays additional information or cleanup messages, if any.
/rLocates <a ID="wPopUp" HREF="HELP=glossary.hlp TOPIC=glos_glo_cigj"> bad sectors </a> and recovers readable information (implies /f ). If ChkDsk cannot lock the volume, it offers to check it the next time the computer starts.
Because NTFS also identifies and remaps bad sectors during the course of normal operations, it is usually not necessary to use the /r parameter unless you suspect that a disk has bad sectors.
/xForces the volume to dismount first, if necessary. All opened handles to the volume are then invalid (implies /f ). This parameter does not work on the boot volume. You must restart the computer to dismount the boot volume.
/iNTFS only. Performs a less-detailed check of index entries, reducing the amount of time needed to run ChkDsk.
/cNTFS only. Skips the checking of cycles within the folder structure, reducing the amount of time needed to run ChkDsk.
/i:sizeNTFS only. Changes the size of the log file to the specified number of kilobytes. Displays the current size if you do not enter a new size.
If the system loses power, stops responding, or is restarted unexpectedly, NTFS runs a recovery procedure when Windows restarts. This procedure accesses information stored in this log file. The size of the log file depends on the size of the volume. In most conditions, you do not need to change the size of the log file. However, if the number of changes to the volume is so great that NTFS fills the log before all metadata is written to disk, then NTFS must force the metadata to disk and free the log space. When this condition occurs, you might notice that Windows stops responding for 5 seconds or longer. You can eliminate the performance impact of forcing the metadata to disk by increasing the size of the log file.
/bNTFS only. Re-evaluates bad clusters on the volume. This is typically not necessary, but it might allow you to reclaim some lost disk space on a hard disk with a large number of bad clusters. However, these clusters might experience problems in the future, decreasing reliability.
/?Displays information about using ChkDsk.
[Previous] [Contents] [Next]

In this tutorial:

  1. Troubleshooting Hardware, Driver, and Disk Issues
  2. Windows 7 Improvements for Hardware and Driver Troubleshooting
  3. Windows Troubleshooting Platform
  4. Built-in Troubleshooting Packs
  5. Windows Troubleshooting Platform Components
  6. Creating Custom Troubleshooting Packs
  7. Running Troubleshooting Packs Remotely
  8. Windows 7 Reliability Monitor
  9. Windows 7 Resource Monitor
  10. Windows Memory Diagnostics
  11. Disk Failure Diagnostics
  12. Self-Healing NTFS
  13. Improved Driver Reliability
  14. Improved Error Reporting
  15. The Process of Troubleshooting Hardware Issues
  16. How to Troubleshoot Problems That Prevent Windows from Starting
  17. How to Troubleshoot Problems Installing New Hardware
  18. How to Troubleshoot Problems with Existing Hardware
  19. How to Troubleshoot Unpredictable Symptoms
  20. How to Diagnose Hardware Problems
  21. How to Use Device Manager to Identify Failed Devices
  22. How to Check the Physical Setup of Your Computer
  23. How to Check the Configuration of Your Hardware
  24. How to Verify That System Firmware and Peripheral Firmware Are Up to Date
  25. How to Test Your Hardware by Running Diagnostic Tools
  26. How to Simplify Your Hardware Configuration
  27. How to Diagnose Disk-Related Problems
  28. How to Use Built-In Diagnostics
  29. How to Use Reliability Monitor
  30. How to Use Event Viewer
  31. How to Use Data Collector Sets
  32. How to Use Windows Memory Diagnostics
  33. Memory Failures
  34. How Windows Automatically Detects Memory Problems
  35. How to Schedule Windows Memory Diagnostics
  36. How to Start Windows Memory Diagnostics When Windows Is Installed
  37. How to Start Windows Memory Diagnostics from the Windows DVD
  38. How to Configure Windows Memory Diagnostics
  39. How to Troubleshoot Disk Problems
  40. How to Prepare for Disk Failures
  41. How to Use ChkDsk
  42. ChkDsk Examples
  43. ChkDsk Syntax
  44. How to Use the Graphical ChkDsk Interface
  45. How to Determine Whether ChkDsk Is Scheduled to Run
  46. ChkDsk Process on NTFS Volumes
  47. How to Use the Disk Cleanup Wizard
  48. How to Disable Nonvolatile Caching
  49. How to Troubleshoot Driver Problems
  50. How to Find Updated Drivers
  51. How to Roll Back Drivers in Windows 7
  52. How to Use Driver Verifier
  53. How to Use the File Signature Verification
  54. How to Use Device Manager to View and Change Resource Usage
  55. How to Use Windows 7 System Restore
  56. How to Troubleshoot USB Problems
  57. How to Solve USB Driver and Hardware Problems
  58. Understanding USB Limitations
  59. How to Identify USB Problems Using Performance Monitor
  60. How to Examine USB Hubs
  61. How to Troubleshoot Bluetooth Problems
  62. Troubleshooting Tools
  63. DiskView
  64. Handle
  65. Process Monitor